﻿using DevExpress.Data.Mask;
using DevExpress.Xpo.Logger;
using DevExpress.XtraEditors;
using GeneralDefine;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace TableModule
{
    public enum TableGoMode
    {
        X = 0,
        Y,
        Z,
        U,
        XY,
        XZ,
        XU,
        YZ,
        YU,
        ZU,
        XYZ,
        XYU,
        XZU,
        YZU,
        XYZU
    }
    public class TableRunner
    {
        public TableActioner tableActioner;
        public TableRunner(TableActioner tableActionerInput)
        {
            tableActioner=tableActionerInput;
        }
        public double GetPosAxis(string strTableName, AxisName axis)
        {
            //CurrentTrace("Call GetPosAxis Function");
            return tableActioner.GetPosAxis(axis);
        }
        public void SetPosAxis(AxisName axis, double dPos)
        {
            tableActioner.SetPosAxis(axis, dPos);
        }
        public double GetPosAxis(AxisName axis)
        {
            //CurrentTrace("Call GetPosAxis Function");
            return tableActioner.GetPosAxis(axis);
        }
        public double GetCommandAxis(AxisName axis)
        {
            //CurrentTrace("Call GetCommandAxis Function");
            return tableActioner.GetCommandAxis(axis);
        }
        public TableDataPosition WhereTable()
        {
            //CurrentTrace("Call WhereTable Function");
            return tableActioner.WhereTable();
        }
        public TableDataPosition WhereAtToolAndLocal()
        {
            //CurrentTrace("Call WhereAtToolAndLocal Function");
            return tableActioner.WhereAtToolAndLocal();
        }
        public TableDataPosition WhereAtLocal(double x, double y, double z, double u, string strLocalName)
        {
            TableDataPosition position = new TableDataPosition();
            position.dXPos = x;
            position.dYPos = y;
            position.dZPos = z;
            position.dUPos = u;
            return tableActioner.WhereAtLocal(position, strLocalName);
        }
        public bool GetHome(AxisName axis)
        {
            //CurrentTrace("Call GetHome Function");
            return tableActioner.GetHome(axis);
        }
        public bool GetAlarm(AxisName axis)
        {
            //CurrentTrace("Call GetAlarm Function");
            return tableActioner.GetAlarm(axis);
        }
        public bool GetCWL(AxisName axis)
        {
            //CurrentTrace("Call GetCWL Function");
            return tableActioner.GetCWL(axis);
        }
        public bool GetCCWL(AxisName axis)
        {
            //CurrentTrace("Call GetCCWL Function");
            return tableActioner.GetCCWL(axis);
        }
        public bool GetMoveDone(AxisName axis)
        {
            //CurrentTrace("Call GetMoveDone Function");
            bool bResult = MoveDone(axis);
            return bResult;
        }
        public bool StopALL()
        {
            CurrentTrace("Call StopALL Function");
            return tableActioner.StopALL();
        }
        public bool Stop(AxisName axis)
        {
            CurrentTrace("Call Stop Function:" + axis.ToString());
            return tableActioner.Stop(axis);
        }
        public bool EstopALL()
        {
            CurrentTrace("Call EstopALL Function");
            StopALL();
            return false;
        }
        public bool SetSpd(TableDataSpeed speed)
        {
            //CurrentTrace("Call SetSpd Function:"+speed.ToString());
            tableActioner.SetSpd(speed);
            return false;
        }
        public bool SetSpd(string strSpdName)
        {
            //CurrentTrace("Call SetSpd Function:" + strSpdName);
            if (!tableActioner.tableDateGlabal.dicTableDataSpeed.Keys.Contains(strSpdName))
            {
                throw (new Exception("运动平台中没有:" + strSpdName + "速度设定"));
            }
            tableActioner.SetSpd(strSpdName);
            return false;
        }
        public bool Jog(AxisName axis, MotionDir dir, bool bWait = true)
        {
            CheckStart();
            tableActioner.Jog(axis, dir);
            //CurrentTrace("Call Jog Function");
            return true;
        }
        public bool Home(AxisName axis, MotionDir dir, HomeMode homeMode, bool bWait = true)
        {
            return false;
        }
        public bool Home(AxisName axis, bool bWait = true)
        {
            CheckStart();
            tableActioner.Home(axis);
            CurrentTrace("Call Home Function");
            GeneralLib.HiPerfTimer timer = new GeneralLib.HiPerfTimer();
            timer.Start();
            #region Wait
            if (bWait)
            {
                while (true)
                {
                    if (tableActioner.MoveDone(axis))
                    {
                        break;
                    }
                    if (CheckNeedStop())
                    {
                        tableActioner.StopALL();
                        WaitMoveDoneALL();
                        while (true)
                        {
                            if (!CheckNeedStop())
                            {
                                tableActioner.Home(axis);
                                timer.Start();
                                break;
                            }
                            System.Threading.Thread.Sleep(1);
                        }

                    }
                    if (timer.TimeUp(120))
                    {
                        XtraMessageBox.Show(tableActioner.tableSetting.strTableName + axis.ToString() + "回原点超时");
                        timer.Start();
                    }
                    System.Threading.Thread.Sleep(1);
                }
            }
            #endregion Wait
            return true;
        }
        public bool AbsMoveSingle(AxisName axis, double dPos, bool bWait = true)
        {
            bool bResult = false;
            CheckStart();
            tableActioner.AbsMoveSingle(axis, dPos);
            CurrentTrace("Call AbsMoveSigle Function:" + dPos.ToString());
            GeneralLib.HiPerfTimer timer = new GeneralLib.HiPerfTimer();
            timer.Start();
            #region Wait
            if (bWait)
            {
                while (true)
                {
                    if (tableActioner.MoveDoneALL())
                    {
                        break;
                    }
                    if (CheckNeedStop())
                    {
                        tableActioner.StopALL();
                        WaitMoveDoneALL();
                        while (true)
                        {
                            if (!CheckNeedStop())
                            {
                                tableActioner.AbsMoveSingle(axis, dPos);
                                timer.Start();
                                break;
                            }
                            System.Threading.Thread.Sleep(1);
                        }

                    }
                    if (timer.TimeUp(120))
                    {
                        XtraMessageBox.Show(tableActioner.tableSetting.strTableName + axis.ToString() + "轴运动超时");
                        timer.Start();
                    }
                    System.Threading.Thread.Sleep(1);
                }
            }
            #endregion Wait
            return bResult;
        }
        public bool AbsMoveSingle(AxisName axis, string strPosName, bool bWait = true)
        {
            bool bResult = false;
            bool bNameExit = false;
            double dPos = 0;
            if (tableActioner.tableDate.dicTableDataPos.Keys.Contains(strPosName))
            {
                bNameExit = true;
                if (axis == AxisName.X)
                    dPos = tableActioner.tableDate.dicTableDataPos[strPosName].dXPos;
                if (axis == AxisName.Y)
                    dPos = tableActioner.tableDate.dicTableDataPos[strPosName].dYPos;
                if (axis == AxisName.Z)
                    dPos = tableActioner.tableDate.dicTableDataPos[strPosName].dZPos;
                if (axis == AxisName.U)
                    dPos = tableActioner.tableDate.dicTableDataPos[strPosName].dUPos;
            }
            if (tableActioner.tableDateGlabal.dicTableDataPos.Keys.Contains(strPosName))
            {
                bNameExit = true;
                if (axis == AxisName.X)
                    dPos = tableActioner.tableDateGlabal.dicTableDataPos[strPosName].dXPos;
                if (axis == AxisName.Y)
                    dPos = tableActioner.tableDateGlabal.dicTableDataPos[strPosName].dYPos;
                if (axis == AxisName.Z)
                    dPos = tableActioner.tableDateGlabal.dicTableDataPos[strPosName].dZPos;
                if (axis == AxisName.U)
                    dPos = tableActioner.tableDateGlabal.dicTableDataPos[strPosName].dUPos;
            }

            if (bNameExit == false)
            {
                throw (new Exception("运动平台中没有:" + strPosName + "位置点"));
            }
            CheckStart();
            tableActioner.AbsMoveSingle(axis, dPos);
            CurrentTrace("Call AbsMoveSigle Function:" + dPos.ToString());
            GeneralLib.HiPerfTimer timer = new GeneralLib.HiPerfTimer();
            timer.Start();
            #region Wait
            if (bWait)
            {
                while (true)
                {
                    if (tableActioner.MoveDoneALL())
                    {
                        break;
                    }
                    if (CheckNeedStop())
                    {
                        tableActioner.StopALL();
                        WaitMoveDoneALL();
                        while (true)
                        {
                            if (!CheckNeedStop())
                            {
                                tableActioner.AbsMoveSingle(axis, dPos);
                                timer.Start();
                                break;
                            }
                            System.Threading.Thread.Sleep(1);
                        }

                    }
                    if (timer.TimeUp(120))
                    {
                        XtraMessageBox.Show(tableActioner.tableSetting.strTableName + axis.ToString() + "轴运动超时");
                        timer.Start();
                    }
                    System.Threading.Thread.Sleep(1);
                }
            }
            #endregion Wait
            return bResult;
        }

        public bool AbsMoveSingleWaitFunctionOn(AxisName axis, double dPos, Func<bool> func)
        {
            bool bResult = false;
            CheckStart();
            tableActioner.AbsMoveSingle(axis, dPos);
            CurrentTrace("Call AbsMoveSingleWaitFunctionOn Function:" + dPos.ToString());
            GeneralLib.HiPerfTimer timer = new GeneralLib.HiPerfTimer();
            timer.Start();
            #region Wait

            while (true)
            {
                if (tableActioner.MoveDoneALL())
                {
                    if (func())
                        bResult = true;
                    else
                        bResult = true;
                    break;
                }
                if (CheckNeedStop())
                {
                    tableActioner.Stop(axis);
                    while (true)
                    {
                        if (!CheckNeedStop())
                        {
                            tableActioner.AbsMoveSingle(axis, dPos);
                            timer.Start();
                            break;
                        }
                        System.Threading.Thread.Sleep(1);
                    }

                }
                if (timer.TimeUp(120))
                {
                    XtraMessageBox.Show(tableActioner.tableSetting.strTableName + axis.ToString() + "轴运动超时");
                    timer.Start();
                }
                if (func())
                {
                    tableActioner.Stop(axis);
                    while (true)
                    {
                        if (tableActioner.MoveDone(axis))
                        {
                            break;
                        }
                        System.Threading.Thread.Sleep(1);
                    }
                    bResult = true;
                    break;
                }
                System.Threading.Thread.Sleep(1);
            }

            #endregion Wait
            return bResult;
        }
        public bool AbsGoXY(double dPosX, double dPosY, bool bWait = true)
        {
            bool bResult = false;
            CheckStart();
            TableDataPosition targetPos = new TableDataPosition();
            targetPos.dXPos = dPosX;
            targetPos.dYPos = dPosY;
            TableDataPosition motorPos = tableActioner.TranTargetToMotor(targetPos);
            tableActioner.AbsMoveSingle(AxisName.X, motorPos.dXPos);
            tableActioner.AbsMoveSingle(AxisName.Y, motorPos.dYPos);
            CurrentTrace("Call AbsGoXY Function:X:" + motorPos.dXPos.ToString() + "," + "Y:" + motorPos.dYPos.ToString());
            GeneralLib.HiPerfTimer timer = new GeneralLib.HiPerfTimer();
            timer.Start();
            #region Wait
            if (bWait)
            {
                while (true)
                {
                    if (tableActioner.MoveDone(AxisName.X) && tableActioner.MoveDone(AxisName.Y))
                    {
                        break;
                    }
                    if (CheckNeedStop())
                    {
                        tableActioner.StopALL();
                        WaitMoveDoneALL();
                        while (true)
                        {
                            if (!CheckNeedStop())
                            {
                                tableActioner.AbsMoveSingle(AxisName.X, motorPos.dXPos);
                                tableActioner.AbsMoveSingle(AxisName.Y, motorPos.dYPos);
                                timer.Start();
                                break;
                            }
                            System.Threading.Thread.Sleep(1);
                        }

                    }
                    if (timer.TimeUp(120))
                    {
                        XtraMessageBox.Show(tableActioner.tableSetting.strTableName + "运动超时");
                        timer.Start();
                    }
                    System.Threading.Thread.Sleep(1);
                }
            }
            #endregion Wait
            return bResult;
        }
        public bool AbsGoXY(string strPosName, bool bWait = true)
        {
            bool bResult = false;
            bool bNameExit = false;
            TableDataPosition targetPos = new TableDataPosition();
            if (tableActioner.tableDate.dicTableDataPos.Keys.Contains(strPosName))
            {
                bNameExit = true;
                targetPos.dXPos = tableActioner.tableDate.dicTableDataPos[strPosName].dXPos;
                targetPos.dYPos = tableActioner.tableDate.dicTableDataPos[strPosName].dYPos;
                targetPos.strLocal = tableActioner.tableDate.dicTableDataPos[strPosName].strLocal;
            }
            if (tableActioner.tableDateGlabal.dicTableDataPos.Keys.Contains(strPosName))
            {
                bNameExit = true;
                targetPos.dXPos = tableActioner.tableDateGlabal.dicTableDataPos[strPosName].dXPos;
                targetPos.dYPos = tableActioner.tableDateGlabal.dicTableDataPos[strPosName].dYPos;
                targetPos.strLocal = tableActioner.tableDateGlabal.dicTableDataPos[strPosName].strLocal;
            }
            if (bNameExit == false)
            {
                throw (new Exception("运动平台中没有:" + strPosName + "位置点"));
            }
            CheckStart();

            TableDataPosition posMotor = tableActioner.TranTargetToMotor(targetPos);
            tableActioner.AbsMoveSingle(AxisName.X, posMotor.dXPos);
            tableActioner.AbsMoveSingle(AxisName.Y, posMotor.dYPos);
            CurrentTrace("Call AbsGoXY Function:" + strPosName + "," + "X:" + "," + posMotor.dXPos.ToString() + "," + "Y:" + posMotor.dYPos.ToString());
            GeneralLib.HiPerfTimer timer = new GeneralLib.HiPerfTimer();
            timer.Start();
            #region Wait
            if (bWait)
            {
                while (true)
                {
                    if (tableActioner.MoveDone(AxisName.X) && tableActioner.MoveDone(AxisName.Y))
                    {
                        break;
                    }
                    if (CheckNeedStop())
                    {
                        tableActioner.StopALL();
                        WaitMoveDoneALL();
                        while (true)
                        {
                            if (!CheckNeedStop())
                            {
                                tableActioner.AbsMoveSingle(AxisName.X, posMotor.dXPos);
                                tableActioner.AbsMoveSingle(AxisName.Y, posMotor.dYPos);
                                timer.Start();
                                break;
                            }
                            System.Threading.Thread.Sleep(1);
                        }

                    }
                    if (timer.TimeUp(120))
                    {
                        XtraMessageBox.Show(tableActioner.tableSetting.strTableName + "运动超时");
                        timer.Start();
                    }
                    System.Threading.Thread.Sleep(1);
                }
            }
            #endregion Wait
            return bResult;
        }
        public bool AbsGoXY(TableDataPosition position, bool bWait = true)
        {
            bool bResult = false;
            CheckStart();
            TableDataPosition targetPos = new TableDataPosition(position);
            TableDataPosition motorPos = tableActioner.TranTargetToMotor(targetPos);
            tableActioner.AbsMoveSingle(AxisName.X, motorPos.dXPos);
            tableActioner.AbsMoveSingle(AxisName.Y, motorPos.dYPos);

            CurrentTrace("Call AbsGoXY Function:X:" + motorPos.dXPos.ToString() + "," + "Y:" + motorPos.dYPos.ToString());
            GeneralLib.HiPerfTimer timer = new GeneralLib.HiPerfTimer();
            timer.Start();
            #region Wait
            if (bWait)
            {
                while (true)
                {
                    if (tableActioner.MoveDone(AxisName.X) && tableActioner.MoveDone(AxisName.Y))
                    {
                        break;
                    }
                    if (CheckNeedStop())
                    {
                        tableActioner.StopALL();
                        WaitMoveDoneALL();
                        while (true)
                        {
                            if (!CheckNeedStop())
                            {
                                tableActioner.AbsMoveSingle(AxisName.X, motorPos.dXPos);
                                tableActioner.AbsMoveSingle(AxisName.Y, motorPos.dYPos);
                                timer.Start();
                                break;
                            }
                            System.Threading.Thread.Sleep(1);
                        }

                    }
                    if (timer.TimeUp(120))
                    {
                        XtraMessageBox.Show(tableActioner.tableSetting.strTableName + "运动超时");
                        timer.Start();
                    }
                    System.Threading.Thread.Sleep(1);
                }
            }
            #endregion Wait
            return bResult;
        }

        public bool AbsGoXZ(double dPosX, double dPosZ, bool bWait = true)
        {
            bool bResult = false;
            CheckStart();
            TableDataPosition targetPos = new TableDataPosition();
            targetPos.dXPos = dPosX;
            targetPos.dZPos = dPosZ;
            TableDataPosition motorPos = tableActioner.TranTargetToMotor(targetPos);
            tableActioner.AbsMoveSingle(AxisName.X, motorPos.dXPos);
            tableActioner.AbsMoveSingle(AxisName.Z, motorPos.dZPos);

            CurrentTrace("Call AbsGoXZ Function:X:" + motorPos.dXPos.ToString() + "," + "Z:" + motorPos.dZPos.ToString());
            GeneralLib.HiPerfTimer timer = new GeneralLib.HiPerfTimer();
            timer.Start();
            #region Wait
            if (bWait)
            {
                while (true)
                {
                    if (tableActioner.MoveDone(AxisName.X) && tableActioner.MoveDone(AxisName.Z))
                    {
                        break;
                    }
                    if (CheckNeedStop())
                    {
                        tableActioner.StopALL();
                        WaitMoveDoneALL();
                        while (true)
                        {
                            if (!CheckNeedStop())
                            {
                                tableActioner.AbsMoveSingle(AxisName.X, motorPos.dXPos);
                                tableActioner.AbsMoveSingle(AxisName.Z, motorPos.dZPos);
                                timer.Start();
                                break;
                            }
                            System.Threading.Thread.Sleep(1);
                        }

                    }
                    if (timer.TimeUp(120))
                    {
                        XtraMessageBox.Show(tableActioner.tableSetting.strTableName + "运动超时");
                        timer.Start();
                    }
                    System.Threading.Thread.Sleep(1);
                }
            }
            #endregion Wait
            return bResult;
        }
        public bool AbsGoXZ(string strPosName, bool bWait = true)
        {
            bool bResult = false;
            bool bNameExit = false;
            //double dPosX = 0;
            //double dPosZ = 0;
            TableDataPosition targetPos = new TableDataPosition();
            if (tableActioner.tableDate.dicTableDataPos.Keys.Contains(strPosName))
            {
                bNameExit = true;
                targetPos.dXPos = tableActioner.tableDate.dicTableDataPos[strPosName].dXPos;
                targetPos.dZPos = tableActioner.tableDate.dicTableDataPos[strPosName].dZPos;
                targetPos.strLocal = tableActioner.tableDate.dicTableDataPos[strPosName].strLocal;
            }
            if (tableActioner.tableDateGlabal.dicTableDataPos.Keys.Contains(strPosName))
            {
                bNameExit = true;
                targetPos.dXPos = tableActioner.tableDateGlabal.dicTableDataPos[strPosName].dXPos;
                targetPos.dZPos = tableActioner.tableDateGlabal.dicTableDataPos[strPosName].dZPos;
                targetPos.strLocal = tableActioner.tableDateGlabal.dicTableDataPos[strPosName].strLocal;
            }
            if (bNameExit == false)
            {
                throw (new Exception("运动平台中没有:" + strPosName + "位置点"));
            }
            CheckStart();

            TableDataPosition motorPos = tableActioner.TranTargetToMotor(targetPos);
            tableActioner.AbsMoveSingle(AxisName.X, motorPos.dXPos);
            tableActioner.AbsMoveSingle(AxisName.Z, motorPos.dZPos);

            CurrentTrace("Call AbsGoXZ Function:" + strPosName + "," + "X:" + motorPos.dXPos.ToString() + "," + "Z:" + motorPos.dZPos.ToString());
            GeneralLib.HiPerfTimer timer = new GeneralLib.HiPerfTimer();
            timer.Start();
            #region Wait
            if (bWait)
            {
                while (true)
                {
                    if (tableActioner.MoveDone(AxisName.X) && tableActioner.MoveDone(AxisName.Z))
                    {
                        break;
                    }
                    if (CheckNeedStop())
                    {
                        tableActioner.StopALL();
                        WaitMoveDoneALL();
                        while (true)
                        {
                            if (!CheckNeedStop())
                            {
                                tableActioner.AbsMoveSingle(AxisName.X, motorPos.dXPos);
                                tableActioner.AbsMoveSingle(AxisName.Z, motorPos.dZPos);
                                timer.Start();
                                break;
                            }
                            System.Threading.Thread.Sleep(1);
                        }

                    }
                    if (timer.TimeUp(120))
                    {
                        XtraMessageBox.Show(tableActioner.tableSetting.strTableName + "运动超时");
                        timer.Start();
                    }
                    System.Threading.Thread.Sleep(1);
                }
            }
            #endregion Wait
            return bResult;
        }
        public bool AbsGoXZ(TableDataPosition position, bool bWait = true)
        {
            bool bResult = false;
            CheckStart();

            TableDataPosition targetPos = new TableDataPosition(position);
            TableDataPosition motorPos = tableActioner.TranTargetToMotor(targetPos);
            tableActioner.AbsMoveSingle(AxisName.X, motorPos.dXPos);
            tableActioner.AbsMoveSingle(AxisName.Z, motorPos.dZPos);

            CurrentTrace("Call AbsGoXZ Function:X:" + motorPos.dXPos.ToString() + "," + "Z:" + motorPos.dZPos.ToString());
            GeneralLib.HiPerfTimer timer = new GeneralLib.HiPerfTimer();
            timer.Start();
            #region Wait
            if (bWait)
            {
                while (true)
                {
                    if (tableActioner.MoveDone(AxisName.X) && tableActioner.MoveDone(AxisName.Z))
                    {
                        break;
                    }
                    if (CheckNeedStop())
                    {
                        tableActioner.StopALL();
                        WaitMoveDoneALL();
                        while (true)
                        {
                            if (!CheckNeedStop())
                            {
                                tableActioner.AbsMoveSingle(AxisName.X, motorPos.dXPos);
                                tableActioner.AbsMoveSingle(AxisName.Z, motorPos.dZPos);
                                timer.Start();
                                break;
                            }
                            System.Threading.Thread.Sleep(1);
                        }

                    }
                    if (timer.TimeUp(120))
                    {
                        XtraMessageBox.Show(tableActioner.tableSetting.strTableName + "运动超时");
                        timer.Start();
                    }
                    System.Threading.Thread.Sleep(1);
                }
            }
            #endregion Wait
            return bResult;
        }

        public bool AbsGoXU(double dPosX, double dPosU, bool bWait = true)
        {
            bool bResult = false;
            CheckStart();
            TableDataPosition targetPos = new TableDataPosition();
            targetPos.dXPos = dPosX;
            targetPos.dUPos = dPosU;
            TableDataPosition motorPos = tableActioner.TranTargetToMotor(targetPos);
            tableActioner.AbsMoveSingle(AxisName.X, motorPos.dXPos);
            tableActioner.AbsMoveSingle(AxisName.U, motorPos.dUPos);
            CurrentTrace("Call AbsGoXU Function:X:" + motorPos.dXPos.ToString() + "," + "U:" + motorPos.dUPos.ToString());
            GeneralLib.HiPerfTimer timer = new GeneralLib.HiPerfTimer();
            timer.Start();
            #region Wait
            if (bWait)
            {
                while (true)
                {
                    if (tableActioner.MoveDone(AxisName.X) && tableActioner.MoveDone(AxisName.U))
                    {
                        break;
                    }
                    if (CheckNeedStop())
                    {
                        tableActioner.StopALL();
                        WaitMoveDoneALL();
                        while (true)
                        {
                            if (!CheckNeedStop())
                            {
                                tableActioner.AbsMoveSingle(AxisName.X, motorPos.dXPos);
                                tableActioner.AbsMoveSingle(AxisName.U, motorPos.dUPos);
                                timer.Start();
                                break;
                            }
                            System.Threading.Thread.Sleep(1);
                        }

                    }
                    if (timer.TimeUp(120))
                    {
                        XtraMessageBox.Show(tableActioner.tableSetting.strTableName + "运动超时");
                        timer.Start();
                    }
                    System.Threading.Thread.Sleep(1);
                }
            }
            #endregion Wait
            return bResult;
        }
        public bool AbsGoXU(string strPosName, bool bWait = true)
        {
            bool bResult = false;
            bool bNameExit = false;
            TableDataPosition targetPos = new TableDataPosition();
            if (tableActioner.tableDate.dicTableDataPos.Keys.Contains(strPosName))
            {
                bNameExit = true;
                targetPos.dXPos = tableActioner.tableDate.dicTableDataPos[strPosName].dXPos;
                targetPos.dUPos = tableActioner.tableDate.dicTableDataPos[strPosName].dUPos;
                targetPos.strLocal = tableActioner.tableDate.dicTableDataPos[strPosName].strLocal;
            }
            if (tableActioner.tableDateGlabal.dicTableDataPos.Keys.Contains(strPosName))
            {
                bNameExit = true;
                targetPos.dXPos = tableActioner.tableDateGlabal.dicTableDataPos[strPosName].dXPos;
                targetPos.dUPos = tableActioner.tableDateGlabal.dicTableDataPos[strPosName].dUPos;
                targetPos.strLocal = tableActioner.tableDateGlabal.dicTableDataPos[strPosName].strLocal;
            }
            if (bNameExit == false)
            {
                throw (new Exception("运动平台中没有:" + strPosName + "位置点"));
            }
            CheckStart();



            TableDataPosition motorPos = tableActioner.TranTargetToMotor(targetPos);
            tableActioner.AbsMoveSingle(AxisName.X, motorPos.dXPos);
            tableActioner.AbsMoveSingle(AxisName.U, motorPos.dUPos);

            CurrentTrace("Call AbsGoXU Function:" + strPosName + "," + "X:" + motorPos.dXPos.ToString() + "," + "U:" + motorPos.dUPos.ToString());
            GeneralLib.HiPerfTimer timer = new GeneralLib.HiPerfTimer();
            timer.Start();
            #region Wait
            if (bWait)
            {
                while (true)
                {
                    if (tableActioner.MoveDone(AxisName.X) && tableActioner.MoveDone(AxisName.U))
                    {
                        break;
                    }
                    if (CheckNeedStop())
                    {
                        tableActioner.StopALL();
                        WaitMoveDoneALL();
                        while (true)
                        {
                            if (!CheckNeedStop())
                            {
                                tableActioner.AbsMoveSingle(AxisName.X, motorPos.dXPos);
                                tableActioner.AbsMoveSingle(AxisName.U, motorPos.dUPos);
                                timer.Start();
                                break;
                            }
                            System.Threading.Thread.Sleep(1);
                        }

                    }
                    if (timer.TimeUp(120))
                    {
                        XtraMessageBox.Show(tableActioner.tableSetting.strTableName + "运动超时");
                        timer.Start();
                    }
                    System.Threading.Thread.Sleep(1);
                }
            }
            #endregion Wait
            return bResult;
        }
        public bool AbsGoXU(TableDataPosition position, bool bWait = true)
        {
            bool bResult = false;
            CheckStart();

            TableDataPosition targetPos = new TableDataPosition(position);
            TableDataPosition motorPos = tableActioner.TranTargetToMotor(targetPos);
            tableActioner.AbsMoveSingle(AxisName.X, motorPos.dXPos);
            tableActioner.AbsMoveSingle(AxisName.U, motorPos.dUPos);

            CurrentTrace("Call AbsGoXU Function:X:" + motorPos.dXPos.ToString() + "," + "U:" + motorPos.dUPos.ToString());
            GeneralLib.HiPerfTimer timer = new GeneralLib.HiPerfTimer();
            timer.Start();
            #region Wait
            if (bWait)
            {
                while (true)
                {
                    if (tableActioner.MoveDone(AxisName.X) && tableActioner.MoveDone(AxisName.U))
                    {
                        break;
                    }
                    if (CheckNeedStop())
                    {
                        tableActioner.StopALL();
                        WaitMoveDoneALL();
                        while (true)
                        {
                            if (!CheckNeedStop())
                            {
                                tableActioner.AbsMoveSingle(AxisName.X, motorPos.dXPos);
                                tableActioner.AbsMoveSingle(AxisName.U, motorPos.dUPos);
                                timer.Start();
                                break;
                            }
                            System.Threading.Thread.Sleep(1);
                        }

                    }
                    if (timer.TimeUp(120))
                    {
                        XtraMessageBox.Show(tableActioner.tableSetting.strTableName + "运动超时");
                        timer.Start();
                    }
                    System.Threading.Thread.Sleep(1);
                }
            }
            #endregion Wait
            return bResult;
        }

        public bool AbsGoYZ(double dPosY, double dPosZ, bool bWait = true)
        {
            bool bResult = false;
            CheckStart();
            TableDataPosition targetPos = new TableDataPosition();
            targetPos.dYPos = dPosY;
            targetPos.dZPos = dPosZ;
            TableDataPosition motorPos = tableActioner.TranTargetToMotor(targetPos);
            tableActioner.AbsMoveSingle(AxisName.Y, motorPos.dYPos);
            tableActioner.AbsMoveSingle(AxisName.Z, motorPos.dZPos);
            CurrentTrace("Call AbsGoYZ Function:Y:" + motorPos.dYPos.ToString() + "," + "Z:" + motorPos.dZPos.ToString());
            GeneralLib.HiPerfTimer timer = new GeneralLib.HiPerfTimer();
            timer.Start();
            #region Wait
            if (bWait)
            {
                while (true)
                {
                    if (tableActioner.MoveDone(AxisName.Y) && tableActioner.MoveDone(AxisName.Z))
                    {
                        break;
                    }
                    if (CheckNeedStop())
                    {
                        tableActioner.StopALL();
                        WaitMoveDoneALL();
                        while (true)
                        {
                            if (!CheckNeedStop())
                            {
                                tableActioner.AbsMoveSingle(AxisName.Y, motorPos.dYPos);
                                tableActioner.AbsMoveSingle(AxisName.Z, motorPos.dZPos);
                                timer.Start();
                                break;
                            }
                            System.Threading.Thread.Sleep(1);
                        }

                    }
                    if (timer.TimeUp(120))
                    {
                        XtraMessageBox.Show(tableActioner.tableSetting.strTableName + "运动超时");
                        timer.Start();
                    }
                    System.Threading.Thread.Sleep(1);
                }
            }
            #endregion Wait
            return bResult;
        }
        public bool AbsGoYZ(string strPosName, bool bWait = true)
        {
            bool bResult = false;
            bool bNameExit = false;
            //double dPosY = 0;
            //double dPosZ = 0;
            TableDataPosition targetPos = new TableDataPosition();
            if (tableActioner.tableDate.dicTableDataPos.Keys.Contains(strPosName))
            {
                bNameExit = true;
                targetPos.dYPos = tableActioner.tableDate.dicTableDataPos[strPosName].dYPos;
                targetPos.dZPos = tableActioner.tableDate.dicTableDataPos[strPosName].dZPos;
                targetPos.strLocal = tableActioner.tableDate.dicTableDataPos[strPosName].strLocal;
            }
            if (tableActioner.tableDateGlabal.dicTableDataPos.Keys.Contains(strPosName))
            {
                bNameExit = true;
                targetPos.dYPos = tableActioner.tableDateGlabal.dicTableDataPos[strPosName].dYPos;
                targetPos.dZPos = tableActioner.tableDateGlabal.dicTableDataPos[strPosName].dZPos;
                targetPos.strLocal = tableActioner.tableDateGlabal.dicTableDataPos[strPosName].strLocal;
            }
            if (bNameExit == false)
            {
                throw (new Exception("运动平台中没有:" + strPosName + "位置点"));
            }
            CheckStart();

            TableDataPosition motorPos = tableActioner.TranTargetToMotor(targetPos);
            tableActioner.AbsMoveSingle(AxisName.Y, motorPos.dYPos);
            tableActioner.AbsMoveSingle(AxisName.Z, motorPos.dZPos);
            CurrentTrace("Call AbsGoYZ Function:Y:" + motorPos.dYPos.ToString() + "," + "Z:" + motorPos.dZPos.ToString());
            GeneralLib.HiPerfTimer timer = new GeneralLib.HiPerfTimer();
            timer.Start();
            #region Wait
            if (bWait)
            {
                while (true)
                {
                    if (tableActioner.MoveDone(AxisName.Y) && tableActioner.MoveDone(AxisName.Z))
                    {
                        break;
                    }
                    if (CheckNeedStop())
                    {
                        tableActioner.StopALL();
                        WaitMoveDoneALL();
                        while (true)
                        {
                            if (!CheckNeedStop())
                            {
                                tableActioner.AbsMoveSingle(AxisName.Y, motorPos.dYPos);
                                tableActioner.AbsMoveSingle(AxisName.Z, motorPos.dZPos);
                                timer.Start();
                                break;
                            }
                            System.Threading.Thread.Sleep(1);
                        }

                    }
                    if (timer.TimeUp(120))
                    {
                        XtraMessageBox.Show(tableActioner.tableSetting.strTableName + "运动超时");
                        timer.Start();
                    }
                    System.Threading.Thread.Sleep(1);
                }
            }
            #endregion Wait
            return bResult;
        }
        public bool AbsGoYZ(TableDataPosition position, bool bWait = true)
        {
            bool bResult = false;
            CheckStart();
            double dPosY = position.dYPos;
            double dPosZ = position.dZPos;
            TableDataPosition targetPos = new TableDataPosition(position);

            TableDataPosition motorPos = tableActioner.TranTargetToMotor(targetPos);
            tableActioner.AbsMoveSingle(AxisName.Y, motorPos.dYPos);
            tableActioner.AbsMoveSingle(AxisName.Z, motorPos.dZPos);
            CurrentTrace("Call AbsGoYZ Function:Y:" + motorPos.dYPos.ToString() + "," + "Z:" + motorPos.dZPos.ToString());
            GeneralLib.HiPerfTimer timer = new GeneralLib.HiPerfTimer();
            timer.Start();
            #region Wait
            if (bWait)
            {
                while (true)
                {
                    if (tableActioner.MoveDone(AxisName.Y) && tableActioner.MoveDone(AxisName.Z))
                    {
                        break;
                    }
                    if (CheckNeedStop())
                    {
                        tableActioner.StopALL();
                        WaitMoveDoneALL();
                        while (true)
                        {
                            if (!CheckNeedStop())
                            {
                                tableActioner.AbsMoveSingle(AxisName.Y, motorPos.dYPos);
                                tableActioner.AbsMoveSingle(AxisName.Z, motorPos.dZPos);
                                timer.Start();
                                break;
                            }
                            System.Threading.Thread.Sleep(1);
                        }

                    }
                    if (timer.TimeUp(120))
                    {
                        XtraMessageBox.Show(tableActioner.tableSetting.strTableName + "运动超时");
                        timer.Start();
                    }
                    System.Threading.Thread.Sleep(1);
                }
            }
            #endregion Wait
            return bResult;
        }

        public bool AbsGoYU(double dPosY, double dPosU, bool bWait = true)
        {
            bool bResult = false;
            CheckStart();
            TableDataPosition targetPos = new TableDataPosition();
            targetPos.dYPos = dPosY;
            targetPos.dUPos = dPosU;
            TableDataPosition motorPos = tableActioner.TranTargetToMotor(targetPos);
            tableActioner.AbsMoveSingle(AxisName.Y, motorPos.dYPos);
            tableActioner.AbsMoveSingle(AxisName.U, motorPos.dUPos);
            CurrentTrace("Call AbsGoYU Function:Y:" + motorPos.dYPos.ToString() + "," + "U:" + motorPos.dUPos.ToString());
            GeneralLib.HiPerfTimer timer = new GeneralLib.HiPerfTimer();
            timer.Start();
            #region Wait
            if (bWait)
            {
                while (true)
                {
                    if (tableActioner.MoveDone(AxisName.Y) && tableActioner.MoveDone(AxisName.U))
                    {
                        break;
                    }
                    if (CheckNeedStop())
                    {
                        tableActioner.StopALL();
                        WaitMoveDoneALL();
                        while (true)
                        {
                            if (!CheckNeedStop())
                            {
                                tableActioner.AbsMoveSingle(AxisName.Y, motorPos.dYPos);
                                tableActioner.AbsMoveSingle(AxisName.U, motorPos.dUPos);
                                timer.Start();
                                break;
                            }
                            System.Threading.Thread.Sleep(1);
                        }

                    }
                    if (timer.TimeUp(120))
                    {
                        XtraMessageBox.Show(tableActioner.tableSetting.strTableName + "运动超时");
                        timer.Start();
                    }
                    System.Threading.Thread.Sleep(1);
                }
            }
            #endregion Wait
            return bResult;
        }
        public bool AbsGoYU(string strPosName, bool bWait = true)
        {
            bool bResult = false;
            bool bNameExit = false;
            //double dPosY = 0;
            //double dPosU = 0;
            TableDataPosition targetPos = new TableDataPosition();
            if (tableActioner.tableDate.dicTableDataPos.Keys.Contains(strPosName))
            {
                bNameExit = true;
                targetPos.dYPos = tableActioner.tableDate.dicTableDataPos[strPosName].dYPos;
                targetPos.dUPos = tableActioner.tableDate.dicTableDataPos[strPosName].dUPos;
                targetPos.strLocal = tableActioner.tableDate.dicTableDataPos[strPosName].strLocal;
            }
            if (tableActioner.tableDateGlabal.dicTableDataPos.Keys.Contains(strPosName))
            {
                bNameExit = true;
                targetPos.dYPos = tableActioner.tableDateGlabal.dicTableDataPos[strPosName].dYPos;
                targetPos.dUPos = tableActioner.tableDateGlabal.dicTableDataPos[strPosName].dUPos;
                targetPos.strLocal = tableActioner.tableDateGlabal.dicTableDataPos[strPosName].strLocal;
            }
            if (bNameExit == false)
            {
                throw (new Exception("运动平台中没有:" + strPosName + "位置点"));
            }
            CheckStart();


            TableDataPosition motorPos = tableActioner.TranTargetToMotor(targetPos);
            tableActioner.AbsMoveSingle(AxisName.Y, motorPos.dYPos);
            tableActioner.AbsMoveSingle(AxisName.U, motorPos.dUPos);
            CurrentTrace("Call AbsGoYU Function:Y:" + motorPos.dYPos.ToString() + "," + "U:" + motorPos.dUPos.ToString());
            GeneralLib.HiPerfTimer timer = new GeneralLib.HiPerfTimer();
            timer.Start();
            #region Wait
            if (bWait)
            {
                while (true)
                {
                    if (tableActioner.MoveDone(AxisName.Y) && tableActioner.MoveDone(AxisName.U))
                    {
                        break;
                    }
                    if (CheckNeedStop())
                    {
                        tableActioner.StopALL();
                        WaitMoveDoneALL();
                        while (true)
                        {
                            if (!CheckNeedStop())
                            {
                                tableActioner.AbsMoveSingle(AxisName.Y, motorPos.dYPos);
                                tableActioner.AbsMoveSingle(AxisName.U, motorPos.dUPos);
                                timer.Start();
                                break;
                            }
                            System.Threading.Thread.Sleep(1);
                        }

                    }
                    if (timer.TimeUp(120))
                    {
                        XtraMessageBox.Show(tableActioner.tableSetting.strTableName + "运动超时");
                        timer.Start();
                    }
                    System.Threading.Thread.Sleep(1);
                }
            }
            #endregion Wait
            return bResult;
        }
        public bool AbsGoYU(TableDataPosition position, bool bWait = true)
        {
            bool bResult = false;
            CheckStart();
            double dPosY = position.dYPos;
            double dPosU = position.dUPos;

            TableDataPosition targetPos = new TableDataPosition(position);
            TableDataPosition motorPos = tableActioner.TranTargetToMotor(targetPos);
            tableActioner.AbsMoveSingle(AxisName.Y, motorPos.dYPos);
            tableActioner.AbsMoveSingle(AxisName.U, motorPos.dUPos);
            CurrentTrace("Call AbsGoYU Function:Y:" + motorPos.dYPos.ToString() + "," + "U:" + motorPos.dUPos.ToString());
            GeneralLib.HiPerfTimer timer = new GeneralLib.HiPerfTimer();
            timer.Start();
            #region Wait
            if (bWait)
            {
                while (true)
                {
                    if (tableActioner.MoveDone(AxisName.Y) && tableActioner.MoveDone(AxisName.U))
                    {
                        break;
                    }
                    if (CheckNeedStop())
                    {
                        tableActioner.StopALL();
                        WaitMoveDoneALL();
                        while (true)
                        {
                            if (!CheckNeedStop())
                            {
                                tableActioner.AbsMoveSingle(AxisName.Y, motorPos.dYPos);
                                tableActioner.AbsMoveSingle(AxisName.U, motorPos.dUPos);
                                timer.Start();
                                break;
                            }
                            System.Threading.Thread.Sleep(1);
                        }

                    }
                    if (timer.TimeUp(120))
                    {
                        XtraMessageBox.Show(tableActioner.tableSetting.strTableName + "运动超时");
                        timer.Start();
                    }
                    System.Threading.Thread.Sleep(1);
                }
            }
            #endregion Wait
            return bResult;
        }

        public bool AbsGoZU(double dPosZ, double dPosU, bool bWait = true)
        {
            bool bResult = false;
            CheckStart();
            TableDataPosition targetPos = new TableDataPosition();
            targetPos.dZPos = dPosZ;
            targetPos.dUPos = dPosU;
            TableDataPosition motorPos = tableActioner.TranTargetToMotor(targetPos);
            tableActioner.AbsMoveSingle(AxisName.Z, motorPos.dZPos);
            tableActioner.AbsMoveSingle(AxisName.U, motorPos.dUPos);
            CurrentTrace("Call AbsGoZU Function:Z:" + motorPos.dZPos.ToString() + "," + "U:" + motorPos.dUPos.ToString());
            GeneralLib.HiPerfTimer timer = new GeneralLib.HiPerfTimer();
            timer.Start();
            #region Wait
            if (bWait)
            {
                while (true)
                {
                    if (tableActioner.MoveDone(AxisName.Z) && tableActioner.MoveDone(AxisName.U))
                    {
                        break;
                    }
                    if (CheckNeedStop())
                    {
                        tableActioner.StopALL();
                        WaitMoveDoneALL();
                        while (true)
                        {
                            if (!CheckNeedStop())
                            {
                                tableActioner.AbsMoveSingle(AxisName.Z, motorPos.dZPos);
                                tableActioner.AbsMoveSingle(AxisName.U, motorPos.dUPos);
                                timer.Start();
                                break;
                            }
                            System.Threading.Thread.Sleep(1);
                        }

                    }
                    if (timer.TimeUp(120))
                    {
                        XtraMessageBox.Show(tableActioner.tableSetting.strTableName + "运动超时");
                        timer.Start();
                    }
                    System.Threading.Thread.Sleep(1);
                }
            }
            #endregion Wait
            return bResult;
        }
        public bool AbsGoZU(string strPosName, bool bWait = true)
        {
            bool bResult = false;
            bool bNameExit = false;
            //double dPosZ = 0;
            //double dPosU = 0;
            TableDataPosition targetPos = new TableDataPosition();
            if (tableActioner.tableDate.dicTableDataPos.Keys.Contains(strPosName))
            {
                bNameExit = true;
                targetPos.dZPos = tableActioner.tableDate.dicTableDataPos[strPosName].dZPos;
                targetPos.dUPos = tableActioner.tableDate.dicTableDataPos[strPosName].dUPos;
                targetPos.strLocal = tableActioner.tableDate.dicTableDataPos[strPosName].strLocal;
            }
            if (tableActioner.tableDateGlabal.dicTableDataPos.Keys.Contains(strPosName))
            {
                bNameExit = true;
                targetPos.dZPos = tableActioner.tableDateGlabal.dicTableDataPos[strPosName].dZPos;
                targetPos.dUPos = tableActioner.tableDateGlabal.dicTableDataPos[strPosName].dUPos;
                targetPos.strLocal = tableActioner.tableDateGlabal.dicTableDataPos[strPosName].strLocal;
            }
            if (bNameExit == false)
            {
                throw (new Exception("运动平台中没有:" + strPosName + "位置点"));
            }
            CheckStart();

            TableDataPosition motorPos = tableActioner.TranTargetToMotor(targetPos);
            tableActioner.AbsMoveSingle(AxisName.Z, motorPos.dZPos);
            tableActioner.AbsMoveSingle(AxisName.U, motorPos.dUPos);
            CurrentTrace("Call AbsGoZU Function:Z:" + motorPos.dZPos.ToString() + "," + "U:" + motorPos.dUPos.ToString());
            GeneralLib.HiPerfTimer timer = new GeneralLib.HiPerfTimer();
            timer.Start();
            #region Wait
            if (bWait)
            {
                while (true)
                {
                    if (tableActioner.MoveDone(AxisName.Z) && tableActioner.MoveDone(AxisName.U))
                    {
                        break;
                    }
                    if (CheckNeedStop())
                    {
                        tableActioner.StopALL();
                        WaitMoveDoneALL();
                        while (true)
                        {
                            if (!CheckNeedStop())
                            {
                                tableActioner.AbsMoveSingle(AxisName.Z, motorPos.dZPos);
                                tableActioner.AbsMoveSingle(AxisName.U, motorPos.dUPos);
                                timer.Start();
                                break;
                            }
                            System.Threading.Thread.Sleep(1);
                        }

                    }
                    if (timer.TimeUp(120))
                    {
                        XtraMessageBox.Show(tableActioner.tableSetting.strTableName + "运动超时");
                        timer.Start();
                    }
                    System.Threading.Thread.Sleep(1);
                }
            }
            #endregion Wait
            return bResult;
        }
        public bool AbsGoZU(TableDataPosition position, bool bWait = true)
        {
            bool bResult = false;
            CheckStart();
            double dPosY = position.dYPos;
            double dPosU = position.dUPos;

            TableDataPosition targetPos = new TableDataPosition(position);
            TableDataPosition motorPos = tableActioner.TranTargetToMotor(targetPos);
            tableActioner.AbsMoveSingle(AxisName.Z, motorPos.dZPos);
            tableActioner.AbsMoveSingle(AxisName.U, motorPos.dUPos);
            CurrentTrace("Call AbsGoZU Function:Z:" + motorPos.dZPos.ToString() + "," + "U:" + motorPos.dUPos.ToString());
            GeneralLib.HiPerfTimer timer = new GeneralLib.HiPerfTimer();
            timer.Start();
            #region Wait
            if (bWait)
            {
                while (true)
                {
                    if (tableActioner.MoveDone(AxisName.Y) && tableActioner.MoveDone(AxisName.U))
                    {
                        break;
                    }
                    if (CheckNeedStop())
                    {
                        tableActioner.StopALL();
                        WaitMoveDoneALL();
                        while (true)
                        {
                            if (!CheckNeedStop())
                            {
                                tableActioner.AbsMoveSingle(AxisName.Z, motorPos.dZPos);
                                tableActioner.AbsMoveSingle(AxisName.U, motorPos.dUPos);
                                timer.Start();
                                break;
                            }
                            System.Threading.Thread.Sleep(1);
                        }

                    }
                    if (timer.TimeUp(120))
                    {
                        XtraMessageBox.Show(tableActioner.tableSetting.strTableName + "运动超时");
                        timer.Start();
                    }
                    System.Threading.Thread.Sleep(1);
                }
            }
            #endregion Wait
            return bResult;
        }

        public bool AbsGoXYZ(double dPosX, double dPosY, double dPosZ, bool bWait = true)
        {
            bool bResult = false;
            CheckStart();

            TableDataPosition targetPos = new TableDataPosition();
            targetPos.dXPos = dPosX;
            targetPos.dYPos = dPosY;
            targetPos.dZPos = dPosZ;
            TableDataPosition motorPos = tableActioner.TranTargetToMotor(targetPos);
            tableActioner.AbsMoveSingle(AxisName.X, motorPos.dXPos);
            tableActioner.AbsMoveSingle(AxisName.Y, motorPos.dYPos);
            tableActioner.AbsMoveSingle(AxisName.Z, motorPos.dZPos);

            CurrentTrace("Call AbsGoXYZ Function:X:" + motorPos.dXPos.ToString() + "," + "Y:" + motorPos.dYPos.ToString() + "," + "Z:" + motorPos.dZPos.ToString());
            GeneralLib.HiPerfTimer timer = new GeneralLib.HiPerfTimer();
            timer.Start();
            #region Wait
            if (bWait)
            {
                while (true)
                {
                    if (tableActioner.MoveDone(AxisName.X) && tableActioner.MoveDone(AxisName.Y) && tableActioner.MoveDone(AxisName.Z))
                    {
                        break;
                    }
                    if (CheckNeedStop())
                    {
                        tableActioner.StopALL();
                        WaitMoveDoneALL();
                        while (true)
                        {
                            if (!CheckNeedStop())
                            {
                                tableActioner.AbsMoveSingle(AxisName.X, motorPos.dXPos);
                                tableActioner.AbsMoveSingle(AxisName.Y, motorPos.dYPos);
                                tableActioner.AbsMoveSingle(AxisName.Z, motorPos.dZPos);
                                timer.Start();
                                break;
                            }
                            System.Threading.Thread.Sleep(1);
                        }

                    }
                    if (timer.TimeUp(120))
                    {
                        XtraMessageBox.Show(tableActioner.tableSetting.strTableName + "运动超时");
                        timer.Start();
                    }
                    System.Threading.Thread.Sleep(1);
                }
            }
            #endregion Wait
            return bResult;
        }
        public bool AbsGoXYZ(string strPosName, bool bWait = true)
        {
            bool bResult = false;
            bool bNameExit = false;
            //double dPosX = 0;
            //double dPosY = 0;
            //double dPosZ = 0;

            TableDataPosition targetPos = new TableDataPosition();
            if (tableActioner.tableDate.dicTableDataPos.Keys.Contains(strPosName))
            {
                bNameExit = true;
                targetPos.dXPos = tableActioner.tableDate.dicTableDataPos[strPosName].dXPos;
                targetPos.dYPos = tableActioner.tableDate.dicTableDataPos[strPosName].dYPos;
                targetPos.dZPos = tableActioner.tableDate.dicTableDataPos[strPosName].dZPos;
                targetPos.strLocal = tableActioner.tableDate.dicTableDataPos[strPosName].strLocal;
            }
            if (tableActioner.tableDateGlabal.dicTableDataPos.Keys.Contains(strPosName))
            {
                bNameExit = true;
                targetPos.dXPos = tableActioner.tableDate.dicTableDataPos[strPosName].dXPos;
                targetPos.dYPos = tableActioner.tableDate.dicTableDataPos[strPosName].dYPos;
                targetPos.dZPos = tableActioner.tableDate.dicTableDataPos[strPosName].dZPos;
                targetPos.strLocal = tableActioner.tableDate.dicTableDataPos[strPosName].strLocal;
            }
            if (bNameExit == false)
            {
                throw (new Exception("运动平台中没有:" + strPosName + "位置点"));
            }
            CheckStart();


            TableDataPosition motorPos = tableActioner.TranTargetToMotor(targetPos);
            tableActioner.AbsMoveSingle(AxisName.X, motorPos.dXPos);
            tableActioner.AbsMoveSingle(AxisName.Y, motorPos.dYPos);
            tableActioner.AbsMoveSingle(AxisName.Z, motorPos.dZPos);

            CurrentTrace("Call AbsGoXYZ Function:X:" + motorPos.dXPos.ToString() + "," + "Y:" + motorPos.dYPos.ToString() + "," + "Z:" + motorPos.dZPos.ToString());
            GeneralLib.HiPerfTimer timer = new GeneralLib.HiPerfTimer();
            timer.Start();
            #region Wait
            if (bWait)
            {
                while (true)
                {
                    if (tableActioner.MoveDone(AxisName.X) && tableActioner.MoveDone(AxisName.Y) && tableActioner.MoveDone(AxisName.Z))
                    {
                        break;
                    }
                    if (CheckNeedStop())
                    {
                        tableActioner.StopALL();
                        WaitMoveDoneALL();
                        while (true)
                        {
                            if (!CheckNeedStop())
                            {
                                tableActioner.AbsMoveSingle(AxisName.X, motorPos.dXPos);
                                tableActioner.AbsMoveSingle(AxisName.Y, motorPos.dYPos);
                                tableActioner.AbsMoveSingle(AxisName.Z, motorPos.dZPos);
                                timer.Start();
                                break;
                            }
                            System.Threading.Thread.Sleep(1);
                        }

                    }
                    if (timer.TimeUp(120))
                    {
                        XtraMessageBox.Show(tableActioner.tableSetting.strTableName + "运动超时");
                        timer.Start();
                    }
                    System.Threading.Thread.Sleep(1);
                }
            }
            #endregion Wait
            return bResult;
        }
        public bool AbsGoXYZ(TableDataPosition position, bool bWait = true)
        {
            bool bResult = false;
            CheckStart();
            TableDataPosition targetPos = new TableDataPosition(position);

            TableDataPosition motorPos = tableActioner.TranTargetToMotor(targetPos);
            tableActioner.AbsMoveSingle(AxisName.X, motorPos.dXPos);
            tableActioner.AbsMoveSingle(AxisName.Y, motorPos.dYPos);
            tableActioner.AbsMoveSingle(AxisName.Z, motorPos.dZPos);

            CurrentTrace("Call AbsGoXYZ Function:X:" + motorPos.dXPos.ToString() + "," + "Y:" + motorPos.dYPos.ToString() + "," + "Z:" + motorPos.dZPos.ToString());
            GeneralLib.HiPerfTimer timer = new GeneralLib.HiPerfTimer();
            timer.Start();
            #region Wait
            if (bWait)
            {
                while (true)
                {
                    if (tableActioner.MoveDone(AxisName.X) && tableActioner.MoveDone(AxisName.Y) && tableActioner.MoveDone(AxisName.Z))
                    {
                        break;
                    }
                    if (CheckNeedStop())
                    {
                        tableActioner.StopALL();
                        WaitMoveDoneALL();
                        while (true)
                        {
                            if (!CheckNeedStop())
                            {
                                tableActioner.AbsMoveSingle(AxisName.X, motorPos.dXPos);
                                tableActioner.AbsMoveSingle(AxisName.Y, motorPos.dYPos);
                                tableActioner.AbsMoveSingle(AxisName.Z, motorPos.dZPos);
                                timer.Start();
                                break;
                            }
                            System.Threading.Thread.Sleep(1);
                        }

                    }
                    if (timer.TimeUp(120))
                    {
                        XtraMessageBox.Show(tableActioner.tableSetting.strTableName + "运动超时");
                        timer.Start();
                    }
                    System.Threading.Thread.Sleep(1);
                }
            }
            #endregion Wait
            return bResult;
        }

        public bool AbsGoXYU(double dPosX, double dPosY, double dPosU, bool bWait = true)
        {
            bool bResult = false;
            CheckStart();

            TableDataPosition targetPos = new TableDataPosition();
            targetPos.dXPos = dPosX;
            targetPos.dYPos = dPosY;
            targetPos.dUPos = dPosU;

            TableDataPosition motorPos = tableActioner.TranTargetToMotor(targetPos);
            tableActioner.AbsMoveSingle(AxisName.X, motorPos.dXPos);
            tableActioner.AbsMoveSingle(AxisName.Y, motorPos.dYPos);
            tableActioner.AbsMoveSingle(AxisName.U, motorPos.dUPos);
            CurrentTrace("Call AbsGoXYU Function:X:" + motorPos.dXPos.ToString() + "," + "Y:" + motorPos.dYPos.ToString() + "," + "U:" + motorPos.dUPos.ToString());
            GeneralLib.HiPerfTimer timer = new GeneralLib.HiPerfTimer();
            timer.Start();
            #region Wait
            if (bWait)
            {
                while (true)
                {
                    if (tableActioner.MoveDone(AxisName.X) && tableActioner.MoveDone(AxisName.Y) && tableActioner.MoveDone(AxisName.U))
                    {
                        break;
                    }
                    if (CheckNeedStop())
                    {
                        tableActioner.StopALL();
                        WaitMoveDoneALL();
                        while (true)
                        {
                            if (!CheckNeedStop())
                            {
                                tableActioner.AbsMoveSingle(AxisName.X, motorPos.dXPos);
                                tableActioner.AbsMoveSingle(AxisName.Y, motorPos.dYPos);
                                tableActioner.AbsMoveSingle(AxisName.U, motorPos.dUPos);
                                timer.Start();
                                break;
                            }
                            System.Threading.Thread.Sleep(1);
                        }

                    }
                    if (timer.TimeUp(120))
                    {
                        XtraMessageBox.Show(tableActioner.tableSetting.strTableName + "运动超时");
                        timer.Start();
                    }
                    System.Threading.Thread.Sleep(1);
                }
            }
            #endregion Wait
            return bResult;
        }
        public bool AbsGoXYU(string strPosName, bool bWait = true)
        {
            bool bResult = false;
            bool bNameExit = false;
            //double dPosX = 0;
            //double dPosY = 0;
            //double dPosU = 0;
            TableDataPosition targetPos = new TableDataPosition();
            if (tableActioner.tableDate.dicTableDataPos.Keys.Contains(strPosName))
            {
                bNameExit = true;
                targetPos.dXPos = tableActioner.tableDate.dicTableDataPos[strPosName].dXPos;
                targetPos.dYPos = tableActioner.tableDate.dicTableDataPos[strPosName].dYPos;
                targetPos.dUPos = tableActioner.tableDate.dicTableDataPos[strPosName].dUPos;
                targetPos.strLocal = tableActioner.tableDate.dicTableDataPos[strPosName].strLocal;

            }
            if (tableActioner.tableDateGlabal.dicTableDataPos.Keys.Contains(strPosName))
            {
                bNameExit = true;
                targetPos.dXPos = tableActioner.tableDateGlabal.dicTableDataPos[strPosName].dXPos;
                targetPos.dYPos = tableActioner.tableDateGlabal.dicTableDataPos[strPosName].dYPos;
                targetPos.dUPos = tableActioner.tableDateGlabal.dicTableDataPos[strPosName].dUPos;
                targetPos.strLocal = tableActioner.tableDateGlabal.dicTableDataPos[strPosName].strLocal;

            }
            if (bNameExit == false)
            {
                throw (new Exception("运动平台中没有:" + strPosName + "位置点"));
            }
            CheckStart();



            TableDataPosition motorPos = tableActioner.TranTargetToMotor(targetPos);
            tableActioner.AbsMoveSingle(AxisName.X, motorPos.dXPos);
            tableActioner.AbsMoveSingle(AxisName.Y, motorPos.dYPos);
            tableActioner.AbsMoveSingle(AxisName.U, motorPos.dUPos);
            CurrentTrace("Call AbsGoXYU Function:X:" + motorPos.dXPos.ToString() + "," + "Y:" + motorPos.dYPos.ToString() + "," + "U:" + motorPos.dUPos.ToString());
            GeneralLib.HiPerfTimer timer = new GeneralLib.HiPerfTimer();
            timer.Start();
            #region Wait
            if (bWait)
            {
                while (true)
                {
                    if (tableActioner.MoveDone(AxisName.X) && tableActioner.MoveDone(AxisName.Y) && tableActioner.MoveDone(AxisName.U))
                    {
                        break;
                    }
                    if (CheckNeedStop())
                    {
                        tableActioner.StopALL();
                        WaitMoveDoneALL();
                        while (true)
                        {
                            if (!CheckNeedStop())
                            {
                                tableActioner.AbsMoveSingle(AxisName.X, motorPos.dXPos);
                                tableActioner.AbsMoveSingle(AxisName.Y, motorPos.dYPos);
                                tableActioner.AbsMoveSingle(AxisName.U, motorPos.dUPos);
                                timer.Start();
                                break;
                            }
                            System.Threading.Thread.Sleep(1);
                        }

                    }
                    if (timer.TimeUp(120))
                    {
                        XtraMessageBox.Show(tableActioner.tableSetting.strTableName + "运动超时");
                        timer.Start();
                    }
                    System.Threading.Thread.Sleep(1);
                }
            }
            #endregion Wait
            return bResult;
        }
        public bool AbsGoXYU(TableDataPosition position, bool bWait = true)
        {
            bool bResult = false;
            CheckStart();
            TableDataPosition motorPos = tableActioner.TranTargetToMotor(position);
            tableActioner.AbsMoveSingle(AxisName.X, motorPos.dXPos);
            tableActioner.AbsMoveSingle(AxisName.Y, motorPos.dYPos);
            tableActioner.AbsMoveSingle(AxisName.U, motorPos.dUPos);
            CurrentTrace("Call AbsGoXYU Function:X:" + motorPos.dXPos.ToString() + "," + "Y:" + motorPos.dYPos.ToString() + "," + "U:" + motorPos.dUPos.ToString());

            GeneralLib.HiPerfTimer timer = new GeneralLib.HiPerfTimer();
            timer.Start();
            #region Wait
            if (bWait)
            {
                while (true)
                {
                    if (tableActioner.MoveDone(AxisName.X) && tableActioner.MoveDone(AxisName.Y) && tableActioner.MoveDone(AxisName.U))
                    {
                        break;
                    }
                    if (CheckNeedStop())
                    {
                        tableActioner.StopALL();
                        WaitMoveDoneALL();
                        while (true)
                        {
                            if (!CheckNeedStop())
                            {
                                tableActioner.AbsMoveSingle(AxisName.X, motorPos.dXPos);
                                tableActioner.AbsMoveSingle(AxisName.Y, motorPos.dYPos);
                                tableActioner.AbsMoveSingle(AxisName.U, motorPos.dUPos);
                                timer.Start();
                                break;
                            }
                            System.Threading.Thread.Sleep(1);
                        }

                    }
                    if (timer.TimeUp(120))
                    {
                        XtraMessageBox.Show(tableActioner.tableSetting.strTableName + "运动超时");
                        timer.Start();
                    }
                    System.Threading.Thread.Sleep(1);
                }
            }
            #endregion Wait
            return bResult;
        }

        public bool AbsGoXZU(double dPosX, double dPosZ, double dPosU, bool bWait = true)
        {
            bool bResult = false;
            CheckStart();
            TableDataPosition targetPos = new TableDataPosition();
            targetPos.dXPos = dPosX;
            targetPos.dZPos = dPosZ;
            targetPos.dUPos = dPosU;
            TableDataPosition motorPos = tableActioner.TranTargetToMotor(targetPos);
            tableActioner.AbsMoveSingle(AxisName.X, motorPos.dXPos);
            tableActioner.AbsMoveSingle(AxisName.Z, motorPos.dZPos);
            tableActioner.AbsMoveSingle(AxisName.U, motorPos.dUPos);
            CurrentTrace("Call AbsGoXZU Function:X:" + motorPos.dXPos.ToString() + "," + "Z:" + motorPos.dYPos.ToString() + "," + "U:" + motorPos.dUPos.ToString());
            GeneralLib.HiPerfTimer timer = new GeneralLib.HiPerfTimer();
            timer.Start();
            #region Wait
            if (bWait)
            {
                while (true)
                {
                    if (tableActioner.MoveDone(AxisName.X) && tableActioner.MoveDone(AxisName.Z) && tableActioner.MoveDone(AxisName.U))
                    {
                        break;
                    }
                    if (CheckNeedStop())
                    {
                        tableActioner.StopALL();
                        WaitMoveDoneALL();
                        while (true)
                        {
                            if (!CheckNeedStop())
                            {
                                tableActioner.AbsMoveSingle(AxisName.X, motorPos.dXPos);
                                tableActioner.AbsMoveSingle(AxisName.Z, motorPos.dZPos);
                                tableActioner.AbsMoveSingle(AxisName.U, motorPos.dUPos);
                                timer.Start();
                                break;
                            }
                            System.Threading.Thread.Sleep(1);
                        }

                    }
                    if (timer.TimeUp(120))
                    {
                        XtraMessageBox.Show(tableActioner.tableSetting.strTableName + "运动超时");
                        timer.Start();
                    }
                    System.Threading.Thread.Sleep(1);
                }
            }
            #endregion Wait
            return bResult;
        }
        public bool AbsGoXZU(string strPosName, bool bWait = true)
        {
            bool bResult = false;
            bool bNameExit = false;
            TableDataPosition targetPos = new TableDataPosition();
            if (tableActioner.tableDate.dicTableDataPos.Keys.Contains(strPosName))
            {
                bNameExit = true;
                targetPos.dXPos = tableActioner.tableDate.dicTableDataPos[strPosName].dXPos;
                targetPos.dZPos = tableActioner.tableDate.dicTableDataPos[strPosName].dZPos;
                targetPos.dUPos = tableActioner.tableDate.dicTableDataPos[strPosName].dUPos;
                targetPos.strLocal = tableActioner.tableDate.dicTableDataPos[strPosName].strLocal;
            }
            if (tableActioner.tableDateGlabal.dicTableDataPos.Keys.Contains(strPosName))
            {
                bNameExit = true;
                targetPos.dXPos = tableActioner.tableDateGlabal.dicTableDataPos[strPosName].dXPos;
                targetPos.dZPos = tableActioner.tableDateGlabal.dicTableDataPos[strPosName].dZPos;
                targetPos.dUPos = tableActioner.tableDateGlabal.dicTableDataPos[strPosName].dUPos;
                targetPos.strLocal = tableActioner.tableDateGlabal.dicTableDataPos[strPosName].strLocal;
            }
            if (bNameExit == false)
            {
                throw (new Exception("运动平台中没有:" + strPosName + "位置点"));
            }
            CheckStart();


            TableDataPosition motorPos = tableActioner.TranTargetToMotor(targetPos);
            tableActioner.AbsMoveSingle(AxisName.X, motorPos.dXPos);
            tableActioner.AbsMoveSingle(AxisName.Z, motorPos.dZPos);
            tableActioner.AbsMoveSingle(AxisName.U, motorPos.dUPos);
            CurrentTrace("Call AbsGoXZU Function:X:" + motorPos.dXPos.ToString() + "," + "Z:" + motorPos.dYPos.ToString() + "," + "U:" + motorPos.dUPos.ToString());

            GeneralLib.HiPerfTimer timer = new GeneralLib.HiPerfTimer();
            timer.Start();

            #region Wait
            if (bWait)
            {
                while (true)
                {
                    if (tableActioner.MoveDone(AxisName.X) && tableActioner.MoveDone(AxisName.Z) && tableActioner.MoveDone(AxisName.U))
                    {
                        break;
                    }
                    if (CheckNeedStop())
                    {
                        tableActioner.StopALL();
                        WaitMoveDoneALL();
                        while (true)
                        {
                            if (!CheckNeedStop())
                            {
                                tableActioner.AbsMoveSingle(AxisName.X, motorPos.dXPos);
                                tableActioner.AbsMoveSingle(AxisName.Z, motorPos.dZPos);
                                tableActioner.AbsMoveSingle(AxisName.U, motorPos.dUPos);
                                timer.Start();
                                break;
                            }
                            System.Threading.Thread.Sleep(1);
                        }

                    }
                    if (timer.TimeUp(120))
                    {
                        XtraMessageBox.Show(tableActioner.tableSetting.strTableName + "运动超时");
                        timer.Start();
                    }
                    System.Threading.Thread.Sleep(1);
                }
            }
            #endregion Wait
            return bResult;
        }
        public bool AbsGoXZU(TableDataPosition position, bool bWait = true)
        {
            bool bResult = false;
            CheckStart();
            TableDataPosition motorPos = tableActioner.TranTargetToMotor(position);
            tableActioner.AbsMoveSingle(AxisName.X, motorPos.dXPos);
            tableActioner.AbsMoveSingle(AxisName.Z, motorPos.dZPos);
            tableActioner.AbsMoveSingle(AxisName.U, motorPos.dUPos);
            CurrentTrace("Call AbsGoXZU Function:X:" + motorPos.dXPos.ToString() + "," + "Z:" + motorPos.dZPos.ToString() + "," + "U:" + motorPos.dUPos.ToString());

            GeneralLib.HiPerfTimer timer = new GeneralLib.HiPerfTimer();
            timer.Start();

            #region Wait
            if (bWait)
            {
                while (true)
                {
                    if (tableActioner.MoveDone(AxisName.X) && tableActioner.MoveDone(AxisName.Z) && tableActioner.MoveDone(AxisName.U))
                    {
                        break;
                    }
                    if (CheckNeedStop())
                    {
                        tableActioner.StopALL();
                        WaitMoveDoneALL();
                        while (true)
                        {
                            if (!CheckNeedStop())
                            {
                                tableActioner.AbsMoveSingle(AxisName.X, motorPos.dXPos);
                                tableActioner.AbsMoveSingle(AxisName.Z, motorPos.dZPos);
                                tableActioner.AbsMoveSingle(AxisName.U, motorPos.dUPos);
                                timer.Start();
                                break;
                            }
                            System.Threading.Thread.Sleep(1);
                        }

                    }
                    if (timer.TimeUp(120))
                    {
                        XtraMessageBox.Show(tableActioner.tableSetting.strTableName + "运动超时");
                        timer.Start();
                    }
                    System.Threading.Thread.Sleep(1);
                }
            }
            #endregion Wait
            return bResult;
        }

        public bool AbsGoYZU(double dPosY, double dPosZ, double dPosU, bool bWait = true)
        {
            bool bResult = false;
            CheckStart();
            TableDataPosition targetPos = new TableDataPosition();
            targetPos.dYPos = dPosY;
            targetPos.dZPos = dPosZ;
            targetPos.dUPos = dPosU;
            TableDataPosition motorPos = tableActioner.TranTargetToMotor(targetPos);
            tableActioner.AbsMoveSingle(AxisName.Y, motorPos.dYPos);
            tableActioner.AbsMoveSingle(AxisName.Z, motorPos.dZPos);
            tableActioner.AbsMoveSingle(AxisName.U, motorPos.dUPos);
            CurrentTrace("Call AbsGoXZU Function:Y:" + motorPos.dYPos.ToString() + "," + "Z:" + motorPos.dZPos.ToString() + "," + "U:" + motorPos.dUPos.ToString());

            GeneralLib.HiPerfTimer timer = new GeneralLib.HiPerfTimer();
            timer.Start();

            #region Wait
            if (bWait)
            {
                while (true)
                {
                    if (tableActioner.MoveDone(AxisName.Y) && tableActioner.MoveDone(AxisName.Z) && tableActioner.MoveDone(AxisName.U))
                    {
                        break;
                    }
                    if (CheckNeedStop())
                    {
                        tableActioner.StopALL();
                        WaitMoveDoneALL();
                        while (true)
                        {
                            if (!CheckNeedStop())
                            {
                                tableActioner.AbsMoveSingle(AxisName.Y, motorPos.dYPos);
                                tableActioner.AbsMoveSingle(AxisName.Z, motorPos.dZPos);
                                tableActioner.AbsMoveSingle(AxisName.U, motorPos.dUPos);
                                timer.Start();
                                break;
                            }
                            System.Threading.Thread.Sleep(1);
                        }

                    }
                    if (timer.TimeUp(120))
                    {
                        XtraMessageBox.Show(tableActioner.tableSetting.strTableName + "运动超时");
                        timer.Start();
                    }
                    System.Threading.Thread.Sleep(1);
                }
            }
            #endregion Wait
            return bResult;
        }
        public bool AbsGoYZU(string strPosName, bool bWait = true)
        {
            bool bResult = false;
            bool bNameExit = false;

            TableDataPosition targetPos = new TableDataPosition();
            if (tableActioner.tableDate.dicTableDataPos.Keys.Contains(strPosName))
            {
                bNameExit = true;
                targetPos.dYPos = tableActioner.tableDate.dicTableDataPos[strPosName].dYPos;
                targetPos.dZPos = tableActioner.tableDate.dicTableDataPos[strPosName].dZPos;
                targetPos.dUPos = tableActioner.tableDate.dicTableDataPos[strPosName].dUPos;
                targetPos.strLocal = tableActioner.tableDate.dicTableDataPos[strPosName].strLocal;

            }
            if (tableActioner.tableDateGlabal.dicTableDataPos.Keys.Contains(strPosName))
            {
                bNameExit = true;

                targetPos.dYPos = tableActioner.tableDateGlabal.dicTableDataPos[strPosName].dYPos;
                targetPos.dZPos = tableActioner.tableDateGlabal.dicTableDataPos[strPosName].dZPos;
                targetPos.dUPos = tableActioner.tableDateGlabal.dicTableDataPos[strPosName].dUPos;
                targetPos.strLocal = tableActioner.tableDateGlabal.dicTableDataPos[strPosName].strLocal;

            }
            if (bNameExit == false)
            {
                throw (new Exception("运动平台中没有:" + strPosName + "位置点"));
            }
            CheckStart();

            TableDataPosition motorPos = tableActioner.TranTargetToMotor(targetPos);
            tableActioner.AbsMoveSingle(AxisName.Y, motorPos.dYPos);
            tableActioner.AbsMoveSingle(AxisName.Z, motorPos.dZPos);
            tableActioner.AbsMoveSingle(AxisName.U, motorPos.dUPos);
            CurrentTrace("Call AbsGoXZU Function:Y:" + motorPos.dYPos.ToString() + "," + "Z:" + motorPos.dZPos.ToString() + "," + "U:" + motorPos.dUPos.ToString());

            GeneralLib.HiPerfTimer timer = new GeneralLib.HiPerfTimer();
            timer.Start();

            #region Wait
            if (bWait)
            {
                while (true)
                {
                    if (tableActioner.MoveDone(AxisName.Y) && tableActioner.MoveDone(AxisName.Z) && tableActioner.MoveDone(AxisName.U))
                    {
                        break;
                    }
                    if (CheckNeedStop())
                    {
                        tableActioner.StopALL();
                        WaitMoveDoneALL();
                        while (true)
                        {
                            if (!CheckNeedStop())
                            {
                                tableActioner.AbsMoveSingle(AxisName.Y, motorPos.dYPos);
                                tableActioner.AbsMoveSingle(AxisName.Z, motorPos.dZPos);
                                tableActioner.AbsMoveSingle(AxisName.U, motorPos.dUPos);
                                timer.Start();
                                break;
                            }
                            System.Threading.Thread.Sleep(1);
                        }

                    }
                    if (timer.TimeUp(120))
                    {
                        XtraMessageBox.Show(tableActioner.tableSetting.strTableName + "运动超时");
                        timer.Start();
                    }
                    System.Threading.Thread.Sleep(1);
                }
            }
            #endregion Wait
            return bResult;
        }
        public bool AbsGoYZU(TableDataPosition position, bool bWait = true)
        {
            bool bResult = false;
            CheckStart();
            double dPosY = position.dYPos;
            double dPosZ = position.dZPos;
            double dPosU = position.dUPos;

            TableDataPosition motorPos = tableActioner.TranTargetToMotor(position);
            tableActioner.AbsMoveSingle(AxisName.Y, motorPos.dYPos);
            tableActioner.AbsMoveSingle(AxisName.Z, motorPos.dZPos);
            tableActioner.AbsMoveSingle(AxisName.U, motorPos.dUPos);
            CurrentTrace("Call AbsGoXZU Function:Y:" + motorPos.dYPos.ToString() + "," + "Z:" + motorPos.dZPos.ToString() + "," + "U:" + motorPos.dUPos.ToString());

            GeneralLib.HiPerfTimer timer = new GeneralLib.HiPerfTimer();
            timer.Start();


            #region Wait
            if (bWait)
            {
                while (true)
                {
                    if (tableActioner.MoveDone(AxisName.Y) && tableActioner.MoveDone(AxisName.Z) && tableActioner.MoveDone(AxisName.U))
                    {
                        break;
                    }
                    if (CheckNeedStop())
                    {
                        tableActioner.StopALL();
                        WaitMoveDoneALL();
                        while (true)
                        {
                            if (!CheckNeedStop())
                            {
                                tableActioner.AbsMoveSingle(AxisName.Y, motorPos.dYPos);
                                tableActioner.AbsMoveSingle(AxisName.Z, motorPos.dZPos);
                                tableActioner.AbsMoveSingle(AxisName.U, motorPos.dUPos);
                                timer.Start();
                                break;
                            }
                            System.Threading.Thread.Sleep(1);
                        }

                    }
                    if (timer.TimeUp(120))
                    {
                        XtraMessageBox.Show(tableActioner.tableSetting.strTableName + "运动超时");
                        timer.Start();
                    }
                    System.Threading.Thread.Sleep(1);
                }
            }
            #endregion Wait
            return bResult;
        }


        public bool RelMoveSingle(AxisName axis, double dPos, bool bWait = true)
        {
            CheckStart();
            double dTargetPos = tableActioner.GetPosAxis(axis) + dPos;
            tableActioner.RelMoveSingle(axis, dPos);
            CurrentTrace("Call RelMoveSigle Function" + dPos.ToString());

            GeneralLib.HiPerfTimer timer = new GeneralLib.HiPerfTimer();
            timer.Start();

            #region Wait
            if (bWait)
            {
                while (true)
                {
                    if (tableActioner.MoveDoneALL())
                    {
                        break;
                    }
                    if (CheckNeedStop())
                    {
                        tableActioner.StopALL();
                        System.Threading.Thread.Sleep(200);
                        WaitMoveDoneALL();
                        double dRemaidDis = dTargetPos - tableActioner.GetPosAxis(axis);
                        while (true)
                        {
                            if (!CheckNeedStop())
                            {
                                tableActioner.RelMoveSingle(axis, dRemaidDis);
                                timer.Start();
                                break;
                            }
                            System.Threading.Thread.Sleep(1);
                        }

                    }
                    if (timer.TimeUp(120))
                    {
                        XtraMessageBox.Show(tableActioner.tableSetting.strTableName + "运动超时");
                        timer.Start();
                    }
                    System.Threading.Thread.Sleep(1);
                }
            }
            #endregion Wait
            return false;
        }
        public bool Move(TableDataPosition position, bool bWait = true)
        {
            CheckStart();
            tableActioner.Move(position);
            CurrentTrace("Call Move Function" + position.ToString());

            GeneralLib.HiPerfTimer timer = new GeneralLib.HiPerfTimer();
            timer.Start();

            #region Wait
            if (bWait)
            {
                while (true)
                {
                    if (tableActioner.MoveDoneALL())
                    {
                        break;
                    }
                    if (CheckNeedStop())
                    {
                        tableActioner.StopALL();
                        WaitMoveDoneALL();
                        while (true)
                        {
                            if (!CheckNeedStop())
                            {
                                tableActioner.Move(position);
                                timer.Start();
                                break;
                            }
                            System.Threading.Thread.Sleep(1);
                        }

                    }
                    if (timer.TimeUp(120))
                    {
                        XtraMessageBox.Show(tableActioner.tableSetting.strTableName + "运动超时");
                        timer.Start();
                    }
                    System.Threading.Thread.Sleep(1);
                }
            }
            #endregion Wait
            return true;
        }
        public bool Move(string strPosName, bool bWait = true)
        {
            bool bNameExit = false;
            if (tableActioner.tableDateGlabal.dicTableDataPos.Keys.Contains(strPosName))
            {
                bNameExit = true;
            }
            if (tableActioner.tableDate.dicTableDataPos.Keys.Contains(strPosName))
            {
                bNameExit = true;
            }
            if (bNameExit == false)
            {
                throw (new Exception("运动平台中没有:" + strPosName + "位置点"));
            }
            CheckStart();
            tableActioner.Move(strPosName);
            CurrentTrace("Call Move Function" + strPosName);

            GeneralLib.HiPerfTimer timer = new GeneralLib.HiPerfTimer();
            timer.Start();

            #region Wait
            if (bWait)
            {
                while (true)
                {
                    if (tableActioner.MoveDoneALL())
                    {
                        break;
                    }
                    if (CheckNeedStop())
                    {
                        tableActioner.StopALL();
                        WaitMoveDoneALL();
                        while (true)
                        {
                            if (!CheckNeedStop())
                            {
                                tableActioner.Move(strPosName);
                                timer.Start();
                                break;
                            }
                            System.Threading.Thread.Sleep(1);
                        }

                    }
                    if (timer.TimeUp(120))
                    {
                        XtraMessageBox.Show(tableActioner.tableSetting.strTableName + "运动超时");
                        timer.Start();
                    }
                    System.Threading.Thread.Sleep(1);
                }
            }
            #endregion Wait
            return true;
        }
        public bool Go(TableDataPosition position, bool bWait = true)
        {
            CheckStart();
            tableActioner.Go(position);
            CurrentTrace("Call Go Function" + position.ToString());

            GeneralLib.HiPerfTimer timer = new GeneralLib.HiPerfTimer();
            timer.Start();


            #region Wait
            if (bWait)
            {
                while (true)
                {
                    if (tableActioner.MoveDoneALL())
                    {
                        break;
                    }
                    if (CheckNeedStop())
                    {
                        tableActioner.StopALL();
                        WaitMoveDoneALL();
                        while (true)
                        {
                            if (!CheckNeedStop())
                            {
                                tableActioner.Go(position);
                                timer.Start();
                                break;
                            }
                            System.Threading.Thread.Sleep(1);
                        }

                    }
                    if (timer.TimeUp(120))
                    {
                        XtraMessageBox.Show(tableActioner.tableSetting.strTableName + "运动超时");
                        timer.Start();
                    }
                    System.Threading.Thread.Sleep(1);
                }
            }
            #endregion Wait
            return true;
        }
        public bool Go(string strPosName, bool bWait = true)
        {
            bool bNameExit = false;
            if (tableActioner.tableDateGlabal.dicTableDataPos.Keys.Contains(strPosName))
            {
                bNameExit = true;
            }
            if (tableActioner.tableDate.dicTableDataPos.Keys.Contains(strPosName))
            {
                bNameExit = true;
            }
            if (bNameExit == false)
            {
                throw (new Exception("运动平台中没有:" + strPosName + "位置点"));
            }
            CheckStart();
            tableActioner.Go(strPosName);
            CurrentTrace("Call Go Function" + strPosName);

            GeneralLib.HiPerfTimer timer = new GeneralLib.HiPerfTimer();
            timer.Start();


            #region Wait
            if (bWait)
            {
                while (true)
                {
                    if (tableActioner.MoveDoneALL())
                    {
                        break;
                    }
                    if (CheckNeedStop())
                    {
                        tableActioner.StopALL();
                        WaitMoveDoneALL();
                        while (true)
                        {
                            if (!CheckNeedStop())
                            {
                                tableActioner.Go(strPosName);
                                timer.Start();
                                break;
                            }
                            System.Threading.Thread.Sleep(1);
                        }

                    }
                    if (timer.TimeUp(120))
                    {
                        XtraMessageBox.Show(tableActioner.tableSetting.strTableName + "运动超时");
                        timer.Start();
                    }
                    System.Threading.Thread.Sleep(1);
                }
            }
            #endregion Wait
            return true;
        }
        public bool Jump(TableDataPosition position, bool bWait = true)
        {
            CheckStart();
            tableActioner.Jump(position);
            CurrentTrace("Call Jump Function" + position.ToString());

            GeneralLib.HiPerfTimer timer = new GeneralLib.HiPerfTimer();
            timer.Start();


            #region Wait
            if (bWait)
            {
                while (true)
                {
                    if (tableActioner.MoveDoneALL())
                    {
                        break;
                    }
                    if (CheckNeedStop())
                    {
                        tableActioner.StopALL();
                        WaitMoveDoneALL();
                        while (true)
                        {
                            if (!CheckNeedStop())
                            {
                                double dCurrentX = GetPosAxis(AxisName.X);
                                double dCurrentY = GetPosAxis(AxisName.Y);
                                if ((Math.Abs(dCurrentX - tableActioner.dTargetPosX) < 0.05) && (Math.Abs(dCurrentY - tableActioner.dTargetPosY) < 0.05))
                                {
                                    tableActioner.Move(position);
                                }
                                else
                                {
                                    tableActioner.Jump(position);
                                }
                                //tableActioner.Jump(position);
                                timer.Start();
                                break;
                            }
                            System.Threading.Thread.Sleep(1);
                        }

                    }
                    if (timer.TimeUp(120))
                    {
                        XtraMessageBox.Show(tableActioner.tableSetting.strTableName + "运动超时");
                        timer.Start();
                    }
                    System.Threading.Thread.Sleep(1);
                }
            }
            #endregion Wait
            return true;
        }
        public bool Jump(string strPosName, bool bWait = true)
        {
            bool bNameExit = false;
            if (tableActioner.tableDateGlabal.dicTableDataPos.Keys.Contains(strPosName))
            {
                bNameExit = true;
            }
            if (tableActioner.tableDate.dicTableDataPos.Keys.Contains(strPosName))
            {
                bNameExit = true;
            }
            if (bNameExit == false)
            {
                throw (new Exception("运动平台中没有:" + strPosName + "位置点"));
            }
            CheckStart();
            tableActioner.Jump(strPosName);
            CurrentTrace("Call Jump Function" + strPosName.ToString());

            GeneralLib.HiPerfTimer timer = new GeneralLib.HiPerfTimer();
            timer.Start();


            #region Wait
            if (bWait)
            {
                while (true)
                {
                    if (tableActioner.MoveDoneALL())
                    {
                        break;
                    }
                    if (CheckNeedStop())
                    {
                        tableActioner.StopALL();
                        WaitMoveDoneALL();
                        while (true)
                        {
                            if (!CheckNeedStop())
                            {
                                double dCurrentX = GetPosAxis(AxisName.X);
                                double dCurrentY = GetPosAxis(AxisName.Y);
                                if ((Math.Abs(dCurrentX - tableActioner.dTargetPosX) < 0.05) && (Math.Abs(dCurrentY - tableActioner.dTargetPosY) < 0.05))
                                {
                                    tableActioner.Move(strPosName);
                                }
                                else
                                {
                                    tableActioner.Jump(strPosName);
                                }
                                //tableActioner.Jump(strPosName);
                                timer.Start();
                                break;
                            }
                            System.Threading.Thread.Sleep(1);
                        }

                    }
                    if (timer.TimeUp(120))
                    {
                        XtraMessageBox.Show(tableActioner.tableSetting.strTableName + "运动超时");
                        timer.Start();
                    }
                    System.Threading.Thread.Sleep(1);
                }
            }
            #endregion Wait
            return true;
        }
        public bool JumpWithOffSet(TableDataPosition position, bool bWait = true, double dOffSetX = 0.0, double dOffSetY = 0.0, double dOffSetZ = 0.0, double dOffSetU = 0.0)
        {
            CheckStart();
            TableDataPosition positionTemp = new TableDataPosition(position);
            positionTemp.dXPos = position.dXPos + dOffSetX;
            positionTemp.dYPos = position.dYPos + dOffSetY;
            positionTemp.dZPos = position.dZPos + dOffSetZ;
            positionTemp.dUPos = position.dUPos + dOffSetU;
            tableActioner.Jump(positionTemp);
            CurrentTrace("Call Jump Function" + position.ToString());

            GeneralLib.HiPerfTimer timer = new GeneralLib.HiPerfTimer();
            timer.Start();


            #region Wait
            if (bWait)
            {
                while (true)
                {
                    if (tableActioner.MoveDoneALL())
                    {
                        break;
                    }
                    if (CheckNeedStop())
                    {
                        tableActioner.StopALL();
                        WaitMoveDoneALL();
                        while (true)
                        {
                            if (!CheckNeedStop())
                            {
                                double dCurrentX = GetPosAxis(AxisName.X);
                                double dCurrentY = GetPosAxis(AxisName.Y);
                                if ((Math.Abs(dCurrentX - tableActioner.dTargetPosX) < 0.05) && (Math.Abs(dCurrentY - tableActioner.dTargetPosY) < 0.05))
                                {
                                    tableActioner.Move(positionTemp);
                                }
                                else
                                {
                                    tableActioner.Jump(positionTemp);
                                }
                                timer.Start();
                                //tableActioner.Jump(positionTemp);
                                break;
                            }
                            System.Threading.Thread.Sleep(1);
                        }

                    }
                    if (timer.TimeUp(120))
                    {
                        XtraMessageBox.Show(tableActioner.tableSetting.strTableName + "运动超时");
                        timer.Start();
                    }
                    System.Threading.Thread.Sleep(1);
                }
            }
            #endregion Wait
            return true;
        }
        public bool JumpWithOffSet(string strPosName, bool bWait = true, double dOffSetX = 0.0, double dOffSetY = 0.0, double dOffSetZ = 0.0, double dOffSetU = 0.0)
        {
            bool bNameExit = false;
            if (tableActioner.tableDateGlabal.dicTableDataPos.Keys.Contains(strPosName))
            {
                bNameExit = true;
            }
            if (tableActioner.tableDate.dicTableDataPos.Keys.Contains(strPosName))
            {
                bNameExit = true;
            }
            if (bNameExit == false)
            {
                throw (new Exception("运动平台中没有:" + strPosName + "位置点"));
            }
            CheckStart();
            TableDataPosition positionTemp = new TableDataPosition(tableActioner.tableDate.dicTableDataPos[strPosName]);
            positionTemp.dXPos = positionTemp.dXPos + dOffSetX;
            positionTemp.dYPos = positionTemp.dYPos + dOffSetY;
            positionTemp.dZPos = positionTemp.dZPos + dOffSetZ;
            positionTemp.dUPos = positionTemp.dUPos + dOffSetU;
            tableActioner.Jump(positionTemp);
            CurrentTrace("Call Jump Function" + strPosName.ToString());

            GeneralLib.HiPerfTimer timer = new GeneralLib.HiPerfTimer();
            timer.Start();


            #region Wait
            if (bWait)
            {
                while (true)
                {
                    if (tableActioner.MoveDoneALL())
                    {
                        break;
                    }
                    if (CheckNeedStop())
                    {
                        tableActioner.StopALL();
                        WaitMoveDoneALL();
                        while (true)
                        {
                            if (!CheckNeedStop())
                            {
                                tableActioner.Jump(positionTemp);
                                timer.Start();
                                break;
                            }
                            System.Threading.Thread.Sleep(1);
                        }

                    }
                    if (timer.TimeUp(120))
                    {
                        XtraMessageBox.Show(tableActioner.tableSetting.strTableName + "运动超时");
                        timer.Start();
                    }
                    System.Threading.Thread.Sleep(1);
                }
            }
            #endregion Wait
            return true;
        }
        public bool Arc(TableDataPosition positionStart, TableDataPosition positionMid, TableDataPosition positionEnd, bool bCW, bool bWait = true)
        {
            CheckStart();
            tableActioner.Arc(positionStart, positionMid, positionEnd, bCW);
            CurrentTrace("Call Arc Function" + positionStart.ToString() + "," + positionMid.ToString() + "," + positionEnd.ToString());

            GeneralLib.HiPerfTimer timer = new GeneralLib.HiPerfTimer();
            timer.Start();


            #region Wait
            if (bWait)
            {
                while (true)
                {
                    if (tableActioner.MoveDoneALL())
                    {
                        break;
                    }
                    if (CheckNeedStop())
                    {
                        tableActioner.StopALL();
                        WaitMoveDoneALL();
                        while (true)
                        {
                            if (!CheckNeedStop())
                            {
                                tableActioner.Arc(positionStart, positionMid, positionEnd, bCW);
                                timer.Start();
                                break;
                            }
                            System.Threading.Thread.Sleep(1);
                        }

                    }
                    if (timer.TimeUp(120))
                    {
                        XtraMessageBox.Show(tableActioner.tableSetting.strTableName + "运动超时");
                        timer.Start();
                    }
                    System.Threading.Thread.Sleep(1);
                }
            }
            #endregion Wait
            return true;

        }
        public bool Arc(TableDataPosition positionStart, TableDataPosition positionCenter, double dAngle, bool bWait = true)
        {
            CheckStart();
            tableActioner.Arc(positionStart, positionCenter, dAngle);
            CurrentTrace("Call Arc Function" + positionStart.ToString() + "," + positionCenter.ToString());

            GeneralLib.HiPerfTimer timer = new GeneralLib.HiPerfTimer();
            timer.Start();

            #region Wait
            if (bWait)
            {
                while (true)
                {
                    if (tableActioner.MoveDoneALL())
                    {
                        break;
                    }
                    if (CheckNeedStop())
                    {
                        tableActioner.StopALL();
                        WaitMoveDoneALL();
                        while (true)
                        {
                            if (!CheckNeedStop())
                            {
                                tableActioner.Arc(positionStart, positionCenter, dAngle);
                                timer.Start();
                                break;
                            }
                            System.Threading.Thread.Sleep(1);
                        }

                    }
                    if (timer.TimeUp(120))
                    {
                        XtraMessageBox.Show(tableActioner.tableSetting.strTableName + "运动超时");
                        timer.Start();
                    }
                    System.Threading.Thread.Sleep(1);
                }
            }
            #endregion Wait
            return false;
        }
        public bool Arc(string strPosStart, string strPosMid, string strPosEnd, bool bCW, bool bWait = true)
        {
            CheckStart();
            tableActioner.Arc(strPosStart, strPosMid, strPosEnd, bCW);
            CurrentTrace("Call Arc Function" + strPosStart + "," + strPosMid.ToString() + "," + strPosEnd.ToString());

            GeneralLib.HiPerfTimer timer = new GeneralLib.HiPerfTimer();
            timer.Start();


            #region Wait
            if (bWait)
            {
                while (true)
                {
                    if (tableActioner.MoveDoneALL())
                    {
                        break;
                    }
                    if (CheckNeedStop())
                    {
                        tableActioner.StopALL();
                        WaitMoveDoneALL();
                        while (true)
                        {
                            if (!CheckNeedStop())
                            {
                                tableActioner.Arc(strPosStart, strPosMid, strPosEnd, bCW);
                                timer.Start();
                                break;
                            }
                            System.Threading.Thread.Sleep(1);
                        }

                    }
                    if (timer.TimeUp(120))
                    {
                        XtraMessageBox.Show(tableActioner.tableSetting.strTableName + "运动超时");
                        timer.Start();
                    }
                    System.Threading.Thread.Sleep(1);
                }
            }
            #endregion Wait
            return false;
        }
        public bool Arc(string strPosStart, string strPosCenter, double dAngle, bool bWait = true)
        {
            CheckStart();
            tableActioner.Arc(strPosStart, strPosCenter, dAngle);
            CurrentTrace("Call Arc Function" + strPosStart + "," + strPosCenter + "," + dAngle.ToString());

            GeneralLib.HiPerfTimer timer = new GeneralLib.HiPerfTimer();
            timer.Start();

            #region Wait
            if (bWait)
            {
                while (true)
                {
                    if (tableActioner.MoveDoneALL())
                    {
                        break;
                    }
                    if (CheckNeedStop())
                    {
                        tableActioner.StopALL();
                        WaitMoveDoneALL();
                        while (true)
                        {
                            if (!CheckNeedStop())
                            {
                                tableActioner.Arc(strPosStart, strPosCenter, dAngle);
                                timer.Start();
                                break;
                            }
                            System.Threading.Thread.Sleep(1);
                        }

                    }
                    if (timer.TimeUp(120))
                    {
                        XtraMessageBox.Show(tableActioner.tableSetting.strTableName + "运动超时");
                        timer.Start();
                    }
                    System.Threading.Thread.Sleep(1);
                }
            }
            #endregion Wait
            return false;
        }
        public bool InitCure()
        {
            tableActioner.InitCure();
            CurrentTrace("Call InitCure Function");
            return false;
        }
        public bool SetCureSpd(TableDataSpeed speed)
        {
            CurrentTrace("Call SetCureSpd Function:" + speed.ToString());
            tableActioner.SetCureSpd(speed);
            return false;
        }
        public bool SetCureSpd(string strSpdName)
        {
            CurrentTrace("Call SetCureSpd Function:" + strSpdName.ToString());
            tableActioner.SetCureSpd(strSpdName);
            return false;
        }
        public bool PushLineToCure(TableDataPosition position)
        {
            CurrentTrace("Call PushLineToCure Function:" + position.ToString());
            tableActioner.PushLineToCure(position);
            return false;
        }
        public bool PushLineToCure(string strName)
        {
            CurrentTrace("Call PushLineToCure Function:" + strName);
            tableActioner.PushLineToCure(strName);
            return false;
        }
        public bool PushArcToCure(TableDataPosition positionStart, TableDataPosition positionMid, TableDataPosition positionEnd, bool bCW)
        {
            CurrentTrace("Call PushArcToCure Function:" + positionStart.ToString());
            tableActioner.PushArcToCure(positionStart, positionMid, positionEnd, bCW,0);
            return false;
        }
        public bool PushArcToCure(TableDataPosition positionStart, TableDataPosition positionCenter, double dAngle)
        {
            CurrentTrace("Call PushArcToCure Function:" + positionStart.ToString());
            tableActioner.PushArcToCure(positionStart, positionCenter, dAngle);
            return false;
        }
        public bool PushArcToCure(string strPosStart, string strPosMid, string strPosEnd, bool bCW)
        {
            CurrentTrace("Call PushArcToCure Function:" + strPosStart);
            tableActioner.PushArcToCure(strPosStart, strPosMid, strPosEnd, bCW,0);
            return false;
        }
        public bool PushArcToCure(string strPosStart, string strPosCenter, double dAngle)
        {
            CurrentTrace("Call PushArcToCure Function:" + strPosStart);
            tableActioner.PushArcToCure(strPosStart, strPosCenter, dAngle);
            return false;
        }
        public bool StartCure(bool bWait = true)
        {
            CurrentTrace("Call StartCure Function");
            tableActioner.StartCure();

            GeneralLib.HiPerfTimer timer = new GeneralLib.HiPerfTimer();
            timer.Start();


            #region Wait
            if (bWait)
            {
                while (true)
                {
                    if (tableActioner.MoveDoneALL())
                    {
                        System.Threading.Thread.Sleep(10);
                        if (tableActioner.MoveDoneALL())
                        {
                            break;
                        }
                    }
                    if (CheckNeedStop())
                    {
                        tableActioner.StopALL();
                        WaitMoveDoneALL();
                        while (true)
                        {
                            if (!CheckNeedStop())
                            {
                                tableActioner.StartCure();
                                timer.Start();
                                break;
                            }
                            System.Threading.Thread.Sleep(1);
                        }

                    }
                    if (timer.TimeUp(120))
                    {
                        XtraMessageBox.Show(tableActioner.tableSetting.strTableName + "运动超时");
                        timer.Start();
                    }
                    System.Threading.Thread.Sleep(1);
                }
            }
            #endregion Wait
            return false;
        }
        public bool GetCureStatus(out bool bMoveDone, out int iItemActioned)
        {
            tableActioner.GetCureStatus(out bMoveDone, out iItemActioned);
            return false;
        }
        public bool MoveDoneALL()
        {
            return tableActioner.MoveDoneALL();
        }
        public bool WaitMoveDoneALL()
        {
            GeneralLib.HiPerfTimer timer = new GeneralLib.HiPerfTimer();
            timer.Start();
            #region Wait
            while (true)
            {
                if (tableActioner.MoveDoneALL())
                {
                    break;
                }
                if (timer.TimeUp(120))
                {
                    XtraMessageBox.Show(tableActioner.tableSetting.strTableName + "运动超时");
                    timer.Start();
                }
                System.Threading.Thread.Sleep(1);
            }
            #endregion Wait
            return true;
        }

        public bool MoveDone(AxisName axis)
        {
            bool bResult = false;
            bResult = tableActioner.MoveDone(axis);
            return bResult;
        }
        public bool WaitMoveDone(AxisName axis)
        {
            bool bResult = true;
            bResult = tableActioner.MoveDone(axis);
            GeneralLib.HiPerfTimer timer = new GeneralLib.HiPerfTimer();
            timer.Start();
            #region Wait
            while (true)
            {
                if (tableActioner.MoveDone(axis))
                {
                    break;
                }
                if (timer.TimeUp(120))
                {
                    XtraMessageBox.Show(tableActioner.tableSetting.strTableName + "运动超时");
                    timer.Start();
                }
                System.Threading.Thread.Sleep(1);
            }
            #endregion Wait
            return bResult;
        }
        public void SetTool(string strToolName)
        {
            CurrentTrace("Call SetTool Function:" + strToolName);
            if (strToolName != "Default")
            {
                if (!tableActioner.tableDateGlabal.dicTableDataTool.Keys.Contains(strToolName))
                {
                    throw (new Exception("运动平台中没有:" + strToolName + "工具设定"));
                }
            }
            tableActioner.SetTool(strToolName);
        }
        public void SetLocal(string strLocalName)
        {
            CurrentTrace("Call SetLocal Function:" + strLocalName);
            if (strLocalName != "Default")
            {
                if (!tableActioner.tableDateGlabal.dicTableDataLocal.Keys.Contains(strLocalName))
                {
                    throw (new Exception("运动平台中没有:" + strLocalName + "Local设定"));
                }
            }
            tableActioner.SetLocal(strLocalName);

        }

        private void CurrentTrace(string strMessage)
        {
            return;
            //if (TaskManager.taskSetting.bLogAll == false)
            //{
            //    return;
            //}
            //try
            //{
            //    StackFrame sf = new StackFrame(1);
            //    string strFunctionNameRunner = sf.GetMethod().Name;
            //    StackFrame sfScript = new StackFrame(2, true);
            //    string strFunctionName = sfScript.GetMethod().DeclaringType.ToString() + "." + sfScript.GetMethod().Name + "." + strFunctionNameRunner;
            //    int iLine = sfScript.GetFileLineNumber();
            //    string strFileNameFull = sfScript.GetFileName();
            //    string strFileName = "";
            //    if (strFileNameFull == null)
            //    {

            //    }
            //    else
            //    {
            //        int iLastMarker = strFileNameFull.LastIndexOf("\\");
            //        int iLastDot = strFileNameFull.LastIndexOf(".");
            //        strFileName = strFileNameFull.Substring(iLastMarker + 1, iLastDot - iLastMarker);
            //    }
            //    foreach (TaskActioner actionerItem in TaskManager.actionCeter.dicTaskActioners.Values)
            //    {

            //        if ((System.Threading.Thread.CurrentThread.ManagedThreadId == actionerItem.taskRun.ManagedThreadId))
            //        {
            //            TaskBodyBase taskCaller = actionerItem.taskCaller;
            //            if (strFileName.IndexOf(actionerItem.strDebugFileName) > -1)
            //            {
            //                strFileName = actionerItem.strName;
            //            }
            //            taskCaller.iRunningLine = iLine;
            //            taskCaller.taskInfo.strTaskMes = strFileName + "_" + strFunctionName;
            //            //LogManager.LogManager.allTask.addLog("File-" + strFileName + "L-" + iLine.ToString() + ":" + strMessage, TaskManager.taskSetting.bLogToUI);
            //            LogManager.LogManager.dicTaskLogs[actionerItem.strName].addLog("File-" + strFileName + "L-" + iLine.ToString() + ":" + strMessage, TaskManager.taskSetting.bLogToUI);
            //            return;
            //        }
            //    }
            //}
            //catch
            //{

            //}



        }
        private void CheckStart()
        {
            //while (true)
            //{
            //    if (MachineStatus.bAlarm)
            //    {
            //        System.Threading.Thread.Sleep(1);
            //        continue;
            //    }
            //    if (MachineStatus.bSafety == false)
            //    {
            //        System.Threading.Thread.Sleep(1);
            //        continue;
            //    }
            //    if (MachineStatus.bStart || MachineStatus.bSemiAuto || MachineStatus.bHoming || FrameManager.MachineStatus.bAuto)
            //        break;
            //    System.Threading.Thread.Sleep(1);
            //}
        }
        private bool CheckNeedStop()
        {
            //if (MachineStatus.bStart == false && MachineStatus.bSemiAuto == false && MachineStatus.bHoming == false && FrameManager.MachineStatus.bAuto == false)
            //{
            //    return true;
            //}
            //if (MachineStatus.bSafety == false || MachineStatus.bAlarm)
            //{
            //    return true;
            //}
            return false;

        }
        public TableDataPosition TranTargetToMotor(string strPosName)
        {
            //LocalToCurrent
            TableDataPosition posTarget = tableActioner.tableDate.dicTableDataPos[strPosName];
            TableDataPosition tempPos = new TableDataPosition(posTarget);
            Matrix matrixToLocal = new Matrix();
            TableDataLocal localData = new TableDataLocal();
            if (posTarget.iLocalNo == 0)
            {

            }
            else
            {
                localData = tableActioner.tableDate.listTableDataLocal[posTarget.iLocalNo - 1];
            }

            matrixToLocal.Translate((float)(localData.dX), (float)(localData.dY));
            matrixToLocal.Rotate((float)(localData.dU));

            PointF[] pf = new PointF[1];
            pf[0].X = (float)(posTarget.dXPos);
            pf[0].Y = (float)(posTarget.dYPos);
            matrixToLocal.TransformPoints(pf);
            tempPos.dXPos = pf[0].X;
            tempPos.dYPos = pf[0].Y;
            tempPos.dZPos = posTarget.dZPos - localData.dZ;
            tempPos.dUPos = posTarget.dUPos;

            //CurrentToTool
            TableDataPosition tempPosTool = new TableDataPosition();
            Matrix matrixToTool = new Matrix();
            matrixToTool.Rotate((float)posTarget.dUPos);
            matrixToTool.Translate((float)(tableActioner.toolSetting.dX), (float)(tableActioner.toolSetting.dY));
            PointF[] pfTool = new PointF[1];
            pfTool[0].X = (float)(0.0);
            pfTool[0].Y = (float)(0.0);
            matrixToTool.TransformPoints(pfTool);
            tempPosTool.dXPos = tempPos.dXPos - pfTool[0].X;
            tempPosTool.dYPos = tempPos.dYPos - pfTool[0].Y;
            tempPosTool.dZPos = tempPos.dZPos - tableActioner.toolSetting.dZ;
            tempPosTool.dUPos = posTarget.dUPos;
            tempPosTool.dJumpLimited = posTarget.dJumpLimited;
            return tempPosTool;
        }
        public void UpdateLocal(string localName, double dMark1X, double dMark1Y, double dMark2X, double dMark2Y, double dStandardX, double dStandardY)
        {
            tableActioner.UpdateLocal(localName, dMark1X, dMark1Y, dMark2X, dMark2Y, dStandardX, dStandardY);
        }
        public void UpdateLocal(string localName, double dLocalOrgX, double dLocalOrgY, double dLocalOrgZ, double dLocalOrgU)
        {
            tableActioner.UpdateLocal(localName, dLocalOrgX, dLocalOrgY, dLocalOrgZ, dLocalOrgU);
        }
        public void UpdateLocal(string localName, double dMark1X, double dMark1Y, double dMark2X, double dMark2Y, double dStandardX1, double dStandardY1, double dStandardX2, double dStandardY2)
        {
            tableActioner.UpdateLocal(localName, dMark1X, dMark1Y, dMark2X, dMark2Y, dStandardX1, dStandardY1, dStandardX2, dStandardY2);
        }
        public void UpdateTool(string toolName, double dToolX, double dToolY)
        {
            tableActioner.UpdateTool(toolName, dToolX, dToolY);
        }
        public void UpdateTool(string toolName, double dToolX, double dToolY, double dXCurrent, double dYCurrent, double dAngleCurrent)
        {
            tableActioner.UpdateTool(toolName, dToolX, dToolY, dXCurrent, dYCurrent, dAngleCurrent);
        }
        public TableDataPosition GetPosition(string strPosName)
        {
            //LocalToCurrent
            TableDataPosition posTarget = null;
            bool bNameExit = false;
            if (tableActioner.tableDateGlabal.dicTableDataPos.Keys.Contains(strPosName))
            {
                bNameExit = true;
                posTarget = tableActioner.tableDateGlabal.dicTableDataPos[strPosName];
            }
            else
            {
                if (tableActioner.tableDate.dicTableDataPos.Keys.Contains(strPosName))
                {
                    bNameExit = true;
                    posTarget = tableActioner.tableDate.dicTableDataPos[strPosName];
                }
            }
            if (bNameExit == false)
            {
                throw (new Exception("运动平台中没有:" + strPosName + "位置点"));
            }
            TableDataPosition tempPos = new TableDataPosition(posTarget);
            return tempPos;
        }
        public bool SetCatchPosInput(int iChannal, int inputChannel, AxisName axisName, bool bRaisedEdge)
        {
            return tableActioner.SetCatchPosInput(iChannal, inputChannel, axisName, bRaisedEdge);
        }
        public bool ResetCatchPosInput(int iChannal, AxisName axisName)
        {
            return tableActioner.ResetCatchPosInput(iChannal, axisName);

        }
        public bool GetCatchPos(int iChannal, out double dAixsPos, AxisName axisName)
        {
            return tableActioner.GetCatchPos(iChannal, out dAixsPos, axisName);
        }
        public bool PushExtDo(int iChannal, int iOnOff)
        {
            return tableActioner.PushExtDo(iChannal, iOnOff);
        }
        public bool PushDelay(double dDelayTime)
        {
            return tableActioner.PushDelay(dDelayTime);
        }
        public bool GetServoOn(AxisName axisName)
        {
            bool bResult = false;
            bResult = tableActioner.GetServoOn(axisName);
            return bResult;
        }
        public bool RstAlarm(AxisName axisName)
        {
            bool bResult = false;
            bResult = tableActioner.RstAlarm(axisName);
            return bResult;
        }
        public bool SetServoOn(AxisName axisName, bool bOn)
        {
            bool bResult = false;
            bResult = tableActioner.SetServoOn(axisName, bOn);
            return bResult;
        }
        //public static bool GoAsTheSameTime(string[] strTableName, string[] strPosName, TableGoMode[] goModes)
        //{
        //    if (strTableName.Length != strPosName.Length)
        //    {
        //        throw (new Exception("同时运动中平台和位置的个数不相等:"));
        //    }
        //    for (int i = 0; i < strTableName.Length; i++)
        //    {
        //        TableActioner tableActionerItem = TableManager.Table(strTableName[i]);

        //        bool bNameExit = false;
        //        if (tableActionerItem.tableDateGlabal.dicTableDataPos.Keys.Contains(strPosName[i]))
        //        {
        //            bNameExit = true;
        //        }
        //        if (tableActionerItem.tableDate.dicTableDataPos.Keys.Contains(strPosName[i]))
        //        {
        //            bNameExit = true;
        //        }
        //        if (bNameExit == false)
        //        {
        //            throw (new Exception(strTableName[i] + "运动平台中没有:" + strPosName + "位置点"));
        //        }
        //    }
        //    TableDataPosition[] posGo = new TableDataPosition[strTableName.Length];
        //    for (int i = 0; i < strPosName.Length; i++)
        //    {
        //        TableActioner tableActionerItem = TableManager.Table(strTableName[i]);
        //        TableRunner tableRunnerItem = new TableRunner(strTableName[i]);
        //        posGo[i] = tableActionerItem.WhereAtToolAndLocal();
        //        if (goModes[i] == TableGoMode.X)
        //        {
        //            posGo[i].dXPos = tableRunnerItem.GetPosition(strPosName[i]).dXPos;
        //        }
        //        else if (goModes[i] == TableGoMode.Y)
        //        {
        //            posGo[i].dYPos = tableRunnerItem.GetPosition(strPosName[i]).dYPos;
        //        }
        //        else if (goModes[i] == TableGoMode.Z)
        //        {
        //            posGo[i].dZPos = tableRunnerItem.GetPosition(strPosName[i]).dZPos;
        //        }
        //        else if (goModes[i] == TableGoMode.U)
        //        {
        //            posGo[i].dUPos = tableRunnerItem.GetPosition(strPosName[i]).dUPos;
        //        }
        //        else if (goModes[i] == TableGoMode.XY)
        //        {
        //            posGo[i].dXPos = tableRunnerItem.GetPosition(strPosName[i]).dXPos;
        //            posGo[i].dYPos = tableRunnerItem.GetPosition(strPosName[i]).dYPos;
        //        }
        //        else if (goModes[i] == TableGoMode.XZ)
        //        {
        //            posGo[i].dXPos = tableRunnerItem.GetPosition(strPosName[i]).dXPos;
        //            posGo[i].dZPos = tableRunnerItem.GetPosition(strPosName[i]).dZPos;
        //        }
        //        else if (goModes[i] == TableGoMode.XU)
        //        {
        //            posGo[i].dXPos = tableRunnerItem.GetPosition(strPosName[i]).dXPos;
        //            posGo[i].dUPos = tableRunnerItem.GetPosition(strPosName[i]).dUPos;
        //        }
        //        else if (goModes[i] == TableGoMode.YZ)
        //        {
        //            posGo[i].dYPos = tableRunnerItem.GetPosition(strPosName[i]).dYPos;
        //            posGo[i].dZPos = tableRunnerItem.GetPosition(strPosName[i]).dZPos;
        //        }
        //        else if (goModes[i] == TableGoMode.YU)
        //        {
        //            posGo[i].dYPos = tableRunnerItem.GetPosition(strPosName[i]).dYPos;
        //            posGo[i].dUPos = tableRunnerItem.GetPosition(strPosName[i]).dUPos;
        //        }
        //        else if (goModes[i] == TableGoMode.ZU)
        //        {
        //            posGo[i].dZPos = tableRunnerItem.GetPosition(strPosName[i]).dZPos;
        //            posGo[i].dUPos = tableRunnerItem.GetPosition(strPosName[i]).dUPos;
        //        }
        //        else if (goModes[i] == TableGoMode.XYZ)
        //        {
        //            posGo[i].dXPos = tableRunnerItem.GetPosition(strPosName[i]).dXPos;
        //            posGo[i].dYPos = tableRunnerItem.GetPosition(strPosName[i]).dYPos;
        //            posGo[i].dZPos = tableRunnerItem.GetPosition(strPosName[i]).dZPos;
        //        }
        //        else if (goModes[i] == TableGoMode.XYU)
        //        {
        //            posGo[i].dXPos = tableRunnerItem.GetPosition(strPosName[i]).dXPos;
        //            posGo[i].dYPos = tableRunnerItem.GetPosition(strPosName[i]).dYPos;
        //            posGo[i].dUPos = tableRunnerItem.GetPosition(strPosName[i]).dUPos;
        //        }
        //        else if (goModes[i] == TableGoMode.YZU)
        //        {
        //            posGo[i].dYPos = tableRunnerItem.GetPosition(strPosName[i]).dYPos;
        //            posGo[i].dZPos = tableRunnerItem.GetPosition(strPosName[i]).dZPos;
        //            posGo[i].dUPos = tableRunnerItem.GetPosition(strPosName[i]).dUPos;
        //        }
        //        else if (goModes[i] == TableGoMode.XZU)
        //        {
        //            posGo[i].dXPos = tableRunnerItem.GetPosition(strPosName[i]).dXPos;
        //            posGo[i].dZPos = tableRunnerItem.GetPosition(strPosName[i]).dZPos;
        //            posGo[i].dUPos = tableRunnerItem.GetPosition(strPosName[i]).dUPos;
        //        }
        //        else if (goModes[i] == TableGoMode.XYZU)
        //        {
        //            posGo[i].dXPos = tableRunnerItem.GetPosition(strPosName[i]).dXPos;
        //            posGo[i].dYPos = tableRunnerItem.GetPosition(strPosName[i]).dYPos;
        //            posGo[i].dZPos = tableRunnerItem.GetPosition(strPosName[i]).dZPos;
        //            posGo[i].dUPos = tableRunnerItem.GetPosition(strPosName[i]).dUPos;
        //        }
        //    }


        //    return GoAsTheSameTime(strTableName, posGo);
        //}
        //public static bool GoAsTheSameTime(string[] strTableName, TableDataPosition[] posData, TableGoMode[] goModes)
        //{
        //    if (strTableName.Length != posData.Length)
        //    {
        //        throw (new Exception("同时运动中平台和位置的个数不相等:"));
        //    }
        //    TableDataPosition[] posGo = new TableDataPosition[strTableName.Length];
        //    for (int i = 0; i < posData.Length; i++)
        //    {
        //        TableActioner tableActionerItem = TableManager.Table(strTableName[i]);
        //        TableRunner tableRunnerItem = new TableRunner(strTableName[i]);
        //        posGo[i] = tableActionerItem.WhereAtToolAndLocal();
        //        if (goModes[i] == TableGoMode.X)
        //        {
        //            posGo[i].dXPos = posData[i].dXPos;
        //        }
        //        else if (goModes[i] == TableGoMode.Y)
        //        {
        //            posGo[i].dYPos = posData[i].dYPos;
        //        }
        //        else if (goModes[i] == TableGoMode.Z)
        //        {
        //            posGo[i].dZPos = posData[i].dZPos;
        //        }
        //        else if (goModes[i] == TableGoMode.U)
        //        {
        //            posGo[i].dUPos = posData[i].dUPos;
        //        }
        //        else if (goModes[i] == TableGoMode.XY)
        //        {
        //            posGo[i].dXPos = posData[i].dXPos;
        //            posGo[i].dYPos = posData[i].dYPos;
        //        }
        //        else if (goModes[i] == TableGoMode.XZ)
        //        {
        //            posGo[i].dXPos = posData[i].dXPos;
        //            posGo[i].dZPos = posData[i].dZPos;
        //        }
        //        else if (goModes[i] == TableGoMode.XU)
        //        {
        //            posGo[i].dXPos = posData[i].dXPos;
        //            posGo[i].dUPos = posData[i].dUPos;
        //        }
        //        else if (goModes[i] == TableGoMode.YZ)
        //        {
        //            posGo[i].dYPos = posData[i].dYPos;
        //            posGo[i].dZPos = posData[i].dZPos;
        //        }
        //        else if (goModes[i] == TableGoMode.YU)
        //        {
        //            posGo[i].dYPos = posData[i].dYPos;
        //            posGo[i].dUPos = posData[i].dUPos;
        //        }
        //        else if (goModes[i] == TableGoMode.ZU)
        //        {
        //            posGo[i].dZPos = posData[i].dZPos;
        //            posGo[i].dUPos = posData[i].dUPos;
        //        }
        //        else if (goModes[i] == TableGoMode.XYZ)
        //        {
        //            posGo[i].dXPos = posData[i].dXPos;
        //            posGo[i].dYPos = posData[i].dYPos;
        //            posGo[i].dZPos = posData[i].dZPos;
        //        }
        //        else if (goModes[i] == TableGoMode.XYU)
        //        {
        //            posGo[i].dXPos = posData[i].dXPos;
        //            posGo[i].dYPos = posData[i].dYPos;
        //            posGo[i].dUPos = posData[i].dUPos;
        //        }
        //        else if (goModes[i] == TableGoMode.YZU)
        //        {
        //            posGo[i].dYPos = posData[i].dYPos;
        //            posGo[i].dZPos = posData[i].dZPos;
        //            posGo[i].dUPos = posData[i].dUPos;
        //        }
        //        else if (goModes[i] == TableGoMode.XZU)
        //        {
        //            posGo[i].dXPos = posData[i].dXPos;
        //            posGo[i].dZPos = posData[i].dZPos;
        //            posGo[i].dUPos = posData[i].dUPos;
        //        }
        //        else if (goModes[i] == TableGoMode.XYZU)
        //        {
        //            posGo[i].dXPos = posData[i].dXPos;
        //            posGo[i].dYPos = posData[i].dYPos;
        //            posGo[i].dZPos = posData[i].dZPos;
        //            posGo[i].dUPos = posData[i].dUPos;
        //        }
        //    }


        //    return GoAsTheSameTime(strTableName, posGo);
        //}
        //public static bool GoAsTheSameTime(string[] strTableName, string[] strPosName)
        //{
        //    if (strTableName.Length != strPosName.Length)
        //    {
        //        throw (new Exception("同时运动中平台和位置的个数不相等:"));
        //    }
        //    for (int i = 0; i < strTableName.Length; i++)
        //    {
        //        TableActioner tableActionerItem = TableManager.Table(strTableName[i]);

        //        bool bNameExit = false;
        //        if (tableActionerItem.tableDateGlabal.dicTableDataPos.Keys.Contains(strPosName[i]))
        //        {
        //            bNameExit = true;
        //        }
        //        if (tableActionerItem.tableDate.dicTableDataPos.Keys.Contains(strPosName[i]))
        //        {
        //            bNameExit = true;
        //        }
        //        if (bNameExit == false)
        //        {
        //            throw (new Exception(strTableName[i] + "运动平台中没有:" + strPosName + "位置点"));
        //        }
        //    }

        //    CheckStartMoveAtTheSaveTime();
        //    for (int i = 0; i < strTableName.Length; i++)
        //    {
        //        TableActioner tableActionerItem = TableManager.Table(strTableName[i]);
        //        tableActionerItem.Go(strPosName[i]);
        //    }
        //    CurrentTraceMoveAtTheSameTime("Call GoAsTheSameTime Function");
        //    GeneralLib.HiPerfTimer timer = new GeneralLib.HiPerfTimer();
        //    timer.Start();
        //    #region Wait

        //    while (true)
        //    {
        //        if (CheckNeedStopMoveAtTheSameTime())
        //        {
        //            for (int i = 0; i < strTableName.Length; i++)
        //            {
        //                TableActioner tableActionerItem = TableManager.Table(strTableName[i]);
        //                tableActionerItem.StopALL();
        //            }
        //            for (int i = 0; i < strTableName.Length; i++)
        //            {
        //                TableRunner tableRunner = new TableRunner(strTableName[i]);
        //                tableRunner.WaitMoveDoneALL();
        //            }
        //            while (true)
        //            {
        //                if (!CheckNeedStopMoveAtTheSameTime())
        //                {
        //                    for (int i = 0; i < strTableName.Length; i++)
        //                    {
        //                        TableActioner tableActionerItem = TableManager.Table(strTableName[i]);
        //                        tableActionerItem.Go(strPosName[i]);
        //                    }
        //                    timer.Start();
        //                    break;
        //                }
        //                System.Threading.Thread.Sleep(1);
        //            }

        //        }
        //        bool bMoveDone = false;
        //        for (int i = 0; i < strTableName.Length; i++)
        //        {
        //            TableActioner tableActionerItem = TableManager.Table(strTableName[i]);
        //            bMoveDone = tableActionerItem.MoveDoneALL();
        //            if (bMoveDone == false)
        //            {
        //                break;
        //            }
        //        }
        //        if (bMoveDone)
        //        {
        //            break;
        //        }
        //        if (timer.TimeUp(120))
        //        {
        //            XtraMessageBox.Show("同时执行" + "运动超时");
        //            timer.Start();
        //        }
        //        System.Threading.Thread.Sleep(1);
        //    }

        //    #endregion Wait
        //    return true;
        //}
        //public static bool GoAsTheSameTime(string[] strTableName, TableDataPosition[] posData)
        //{
        //    if (strTableName.Length != posData.Length)
        //    {
        //        throw (new Exception("同时运动中平台和位置的个数不相等:"));
        //    }
        //    CheckStartMoveAtTheSaveTime();
        //    for (int i = 0; i < strTableName.Length; i++)
        //    {
        //        TableActioner tableActionerItem = TableManager.Table(strTableName[i]);
        //        tableActionerItem.Go(posData[i]);
        //    }
        //    CurrentTraceMoveAtTheSameTime("Call GoAsTheSameTime Function");
        //    GeneralLib.HiPerfTimer timer = new GeneralLib.HiPerfTimer();
        //    timer.Start();
        //    #region Wait

        //    while (true)
        //    {
        //        if (CheckNeedStopMoveAtTheSameTime())
        //        {
        //            for (int i = 0; i < strTableName.Length; i++)
        //            {
        //                TableActioner tableActionerItem = TableManager.Table(strTableName[i]);
        //                tableActionerItem.StopALL();
        //            }
        //            for (int i = 0; i < strTableName.Length; i++)
        //            {
        //                TableRunner tableRunner = new TableRunner(strTableName[i]);
        //                tableRunner.WaitMoveDoneALL();
        //            }
        //            while (true)
        //            {
        //                if (!CheckNeedStopMoveAtTheSameTime())
        //                {
        //                    for (int i = 0; i < strTableName.Length; i++)
        //                    {
        //                        TableActioner tableActionerItem = TableManager.Table(strTableName[i]);
        //                        tableActionerItem.Go(posData[i]);
        //                    }
        //                    timer.Start();
        //                    break;
        //                }
        //                System.Threading.Thread.Sleep(1);
        //            }

        //        }
        //        bool bMoveDone = false;
        //        for (int i = 0; i < strTableName.Length; i++)
        //        {
        //            TableActioner tableActionerItem = TableManager.Table(strTableName[i]);
        //            bMoveDone = tableActionerItem.MoveDoneALL();
        //            if (bMoveDone == false)
        //            {
        //                break;
        //            }
        //        }
        //        if (bMoveDone)
        //        {
        //            break;
        //        }
        //        if (timer.TimeUp(120))
        //        {
        //            XtraMessageBox.Show("同时执行" + "运动超时");
        //            timer.Start();
        //        }
        //        System.Threading.Thread.Sleep(1);
        //    }

        //    #endregion Wait
        //    return true;
        //}
        //private static void CheckStartMoveAtTheSaveTime()
        //{
        //    while (true)
        //    {
        //        if (MachineStatus.bAlarm)
        //        {
        //            System.Threading.Thread.Sleep(1);
        //            continue;
        //        }
        //        if (MachineStatus.bSafety == false)
        //        {
        //            System.Threading.Thread.Sleep(1);
        //            continue;
        //        }
        //        if (MachineStatus.bStart || MachineStatus.bSemiAuto || MachineStatus.bHoming || FrameManager.MachineStatus.bAuto)
        //            break;
        //        System.Threading.Thread.Sleep(1);
        //    }
        //}
        //private static void CurrentTraceMoveAtTheSameTime(string strMessage)
        //{
        //    if (TaskManager.taskSetting.bLogAll == false)
        //    {
        //        return;
        //    }
        //    try
        //    {
        //        StackTrace st = new StackTrace(true);
        //        StackFrame[] sfs = st.GetFrames();

        //        string fileList = "";
        //        foreach (StackFrame stackFrameItem in sfs)
        //        {
        //            string strTempFileName = stackFrameItem.GetFileName();
        //            if (strTempFileName != null)
        //            {
        //                int iLastMarker = strTempFileName.LastIndexOf("\\");
        //                int iLastDot = strTempFileName.LastIndexOf(".");
        //                string strCurrentFileName = strTempFileName.Substring(iLastMarker + 1, iLastDot - iLastMarker);
        //                fileList = fileList + strCurrentFileName;
        //            }

        //        }
        //        StackFrame sf = new StackFrame(1);
        //        string strFunctionNameRunner = sf.GetMethod().Name;
        //        StackFrame sfScript = new StackFrame(2, true);
        //        string strFunctionName = sfScript.GetMethod().DeclaringType.ToString() + "." + sfScript.GetMethod().Name + "." + strFunctionNameRunner;
        //        int iLine = sfScript.GetFileLineNumber();
        //        string strFileNameFull = sfScript.GetFileName();
        //        string strFileName = "";
        //        if (strFileNameFull == null)
        //        {

        //        }
        //        else
        //        {
        //            int iLastMarker = strFileNameFull.LastIndexOf("\\");
        //            int iLastDot = strFileNameFull.LastIndexOf(".");
        //            strFileName = strFileNameFull.Substring(iLastMarker + 1, iLastDot - iLastMarker);
        //        }
        //        foreach (TaskActioner actionerItem in TaskManager.actionCeter.dicTaskActioners.Values)
        //        {
        //            int indexFind = fileList.IndexOf(actionerItem.strDebugFileName);
        //            if (strFileName.IndexOf(actionerItem.strDebugFileName) > -1)
        //            {
        //                strFileName = actionerItem.strName;
        //            }
        //            if (indexFind > -1 || (System.Threading.Thread.CurrentThread.ManagedThreadId == actionerItem.taskRun.ManagedThreadId))
        //            {
        //                TaskBodyBase taskCaller = actionerItem.taskCaller;
        //                taskCaller.iRunningLine = iLine;
        //                taskCaller.taskInfo.strTaskMes = strFileName + "_" + strFunctionName;
        //                LogManager.LogManager.allTask.addLog("File-" + strFileName + "L-" + iLine.ToString() + ":" + strMessage, TaskManager.taskSetting.bLogToUI);
        //                LogManager.LogManager.dicTaskLogs[actionerItem.strName].addLog("File-" + strFileName + "L-" + iLine.ToString() + ":" + strMessage, TaskManager.taskSetting.bLogToUI);
        //                return;
        //            }
        //        }
        //    }
        //    catch
        //    {

        //    }
        //}
        //private static bool CheckNeedStopMoveAtTheSameTime()
        //{
        //    if (MachineStatus.bStart == false && MachineStatus.bSemiAuto == false && MachineStatus.bHoming == false && FrameManager.MachineStatus.bAuto == false)
        //    {
        //        return true;
        //    }
        //    if (MachineStatus.bSafety == false || MachineStatus.bAlarm)
        //    {
        //        return true;
        //    }
        //    return false;

        //}

        //public static bool GoAsTheSameTime(string[] strTableNames, string[] strPosNames, string[] tableSpds, TableGoMode[] goModes)
        //{
        //    if (strTableNames.Length != strPosNames.Length)
        //    {
        //        throw (new Exception("同时运动中平台和位置的个数不相等:"));
        //    }
        //    if (strTableNames.Length != tableSpds.Length)
        //    {
        //        throw (new Exception("同时运动中平台和速度的个数不相等:"));
        //    }
        //    if (strTableNames.Length != goModes.Length)
        //    {
        //        throw (new Exception("同时运动中平台和运动模式的个数不相等:"));
        //    }
        //    for (int i = 0; i < strTableNames.Length; i++)
        //    {
        //        TableActioner tableActionerItem = TableManager.Table(strTableNames[i]);

        //        bool bNameExit = false;
        //        if (tableActionerItem.tableDateGlabal.dicTableDataPos.Keys.Contains(strPosNames[i]))
        //        {
        //            bNameExit = true;
        //        }
        //        if (tableActionerItem.tableDate.dicTableDataPos.Keys.Contains(strPosNames[i]))
        //        {
        //            bNameExit = true;
        //        }
        //        if (bNameExit == false)
        //        {
        //            throw (new Exception(strTableNames[i] + "运动平台中没有:" + strPosNames[i] + "位置点"));
        //        }
        //    }
        //    CheckStartMoveAtTheSaveTime();
        //    for (int i = 0; i < strPosNames.Length; i++)
        //    {
        //        TableActioner tableActionerItem = TableManager.Table(strTableNames[i]);
        //        TableRunner tableRunnerItem = new TableRunner(strTableNames[i]);
        //        tableActionerItem.SetSpd(tableSpds[i]);
        //        if (goModes[i] == TableGoMode.X)
        //        {
        //            tableActionerItem.AbsMoveSingle(AxisName.X, tableRunnerItem.GetPosition(strPosNames[i]).dXPos);
        //        }
        //        else if (goModes[i] == TableGoMode.Y)
        //        {
        //            tableActionerItem.AbsMoveSingle(AxisName.Y, tableRunnerItem.GetPosition(strPosNames[i]).dYPos);
        //        }
        //        else if (goModes[i] == TableGoMode.Z)
        //        {
        //            tableActionerItem.AbsMoveSingle(AxisName.Z, tableRunnerItem.GetPosition(strPosNames[i]).dZPos);
        //        }
        //        else if (goModes[i] == TableGoMode.U)
        //        {
        //            tableActionerItem.AbsMoveSingle(AxisName.U, tableRunnerItem.GetPosition(strPosNames[i]).dUPos);
        //        }
        //        else if (goModes[i] == TableGoMode.XY)
        //        {
        //            tableActionerItem.AbsMoveSingle(AxisName.X, tableRunnerItem.GetPosition(strPosNames[i]).dXPos);
        //            tableActionerItem.AbsMoveSingle(AxisName.Y, tableRunnerItem.GetPosition(strPosNames[i]).dYPos);
        //        }
        //        else if (goModes[i] == TableGoMode.XZ)
        //        {
        //            tableActionerItem.AbsMoveSingle(AxisName.X, tableRunnerItem.GetPosition(strPosNames[i]).dXPos);
        //            tableActionerItem.AbsMoveSingle(AxisName.Z, tableRunnerItem.GetPosition(strPosNames[i]).dZPos);
        //        }
        //        else if (goModes[i] == TableGoMode.XU)
        //        {
        //            tableActionerItem.AbsMoveSingle(AxisName.X, tableRunnerItem.GetPosition(strPosNames[i]).dXPos);
        //            tableActionerItem.AbsMoveSingle(AxisName.U, tableRunnerItem.GetPosition(strPosNames[i]).dUPos);
        //        }
        //        else if (goModes[i] == TableGoMode.YZ)
        //        {
        //            tableActionerItem.AbsMoveSingle(AxisName.Y, tableRunnerItem.GetPosition(strPosNames[i]).dYPos);
        //            tableActionerItem.AbsMoveSingle(AxisName.Z, tableRunnerItem.GetPosition(strPosNames[i]).dZPos);
        //        }
        //        else if (goModes[i] == TableGoMode.YU)
        //        {
        //            tableActionerItem.AbsMoveSingle(AxisName.Y, tableRunnerItem.GetPosition(strPosNames[i]).dYPos);
        //            tableActionerItem.AbsMoveSingle(AxisName.U, tableRunnerItem.GetPosition(strPosNames[i]).dUPos);
        //        }
        //        else if (goModes[i] == TableGoMode.ZU)
        //        {
        //            tableActionerItem.AbsMoveSingle(AxisName.Z, tableRunnerItem.GetPosition(strPosNames[i]).dZPos);
        //            tableActionerItem.AbsMoveSingle(AxisName.U, tableRunnerItem.GetPosition(strPosNames[i]).dUPos);
        //        }
        //        else if (goModes[i] == TableGoMode.XYZ)
        //        {
        //            tableActionerItem.AbsMoveSingle(AxisName.X, tableRunnerItem.GetPosition(strPosNames[i]).dXPos);
        //            tableActionerItem.AbsMoveSingle(AxisName.Y, tableRunnerItem.GetPosition(strPosNames[i]).dYPos);
        //            tableActionerItem.AbsMoveSingle(AxisName.Z, tableRunnerItem.GetPosition(strPosNames[i]).dZPos);
        //        }
        //        else if (goModes[i] == TableGoMode.XYU)
        //        {
        //            tableActionerItem.AbsMoveSingle(AxisName.X, tableRunnerItem.GetPosition(strPosNames[i]).dXPos);
        //            tableActionerItem.AbsMoveSingle(AxisName.Y, tableRunnerItem.GetPosition(strPosNames[i]).dYPos);
        //            tableActionerItem.AbsMoveSingle(AxisName.U, tableRunnerItem.GetPosition(strPosNames[i]).dUPos);
        //        }
        //        else if (goModes[i] == TableGoMode.YZU)
        //        {
        //            tableActionerItem.AbsMoveSingle(AxisName.Y, tableRunnerItem.GetPosition(strPosNames[i]).dYPos);
        //            tableActionerItem.AbsMoveSingle(AxisName.Z, tableRunnerItem.GetPosition(strPosNames[i]).dZPos);
        //            tableActionerItem.AbsMoveSingle(AxisName.U, tableRunnerItem.GetPosition(strPosNames[i]).dUPos);
        //        }
        //        else if (goModes[i] == TableGoMode.XZU)
        //        {
        //            tableActionerItem.AbsMoveSingle(AxisName.X, tableRunnerItem.GetPosition(strPosNames[i]).dXPos);
        //            tableActionerItem.AbsMoveSingle(AxisName.Z, tableRunnerItem.GetPosition(strPosNames[i]).dZPos);
        //            tableActionerItem.AbsMoveSingle(AxisName.U, tableRunnerItem.GetPosition(strPosNames[i]).dUPos);
        //        }
        //        else if (goModes[i] == TableGoMode.XYZU)
        //        {
        //            tableActionerItem.AbsMoveSingle(AxisName.X, tableRunnerItem.GetPosition(strPosNames[i]).dXPos);
        //            tableActionerItem.AbsMoveSingle(AxisName.Y, tableRunnerItem.GetPosition(strPosNames[i]).dYPos);
        //            tableActionerItem.AbsMoveSingle(AxisName.Z, tableRunnerItem.GetPosition(strPosNames[i]).dZPos);
        //            tableActionerItem.AbsMoveSingle(AxisName.U, tableRunnerItem.GetPosition(strPosNames[i]).dUPos);
        //        }
        //    }
        //    CurrentTraceMoveAtTheSameTime("Call GoAsTheSameTime Function");
        //    GeneralLib.HiPerfTimer timer = new GeneralLib.HiPerfTimer();
        //    timer.Start();
        //    #region Wait

        //    while (true)
        //    {
        //        if (CheckNeedStopMoveAtTheSameTime())
        //        {
        //            for (int i = 0; i < strTableNames.Length; i++)
        //            {
        //                TableActioner tableActionerItem = TableManager.Table(strTableNames[i]);
        //                tableActionerItem.SetSpd(tableSpds[i]);
        //                tableActionerItem.StopALL();
        //            }
        //            for (int i = 0; i < strTableNames.Length; i++)
        //            {
        //                TableRunner tableRunner = new TableRunner(strTableNames[i]);
        //                tableRunner.WaitMoveDoneALL();
        //            }
        //            while (true)
        //            {
        //                if (!CheckNeedStopMoveAtTheSameTime())
        //                {
        //                    for (int i = 0; i < strPosNames.Length; i++)
        //                    {
        //                        TableActioner tableActionerItem = TableManager.Table(strTableNames[i]);
        //                        TableRunner tableRunnerItem = new TableRunner(strTableNames[i]);
        //                        if (goModes[i] == TableGoMode.X)
        //                        {
        //                            tableActionerItem.AbsMoveSingle(AxisName.X, tableRunnerItem.GetPosition(strPosNames[i]).dXPos);
        //                        }
        //                        else if (goModes[i] == TableGoMode.Y)
        //                        {
        //                            tableActionerItem.AbsMoveSingle(AxisName.Y, tableRunnerItem.GetPosition(strPosNames[i]).dYPos);
        //                        }
        //                        else if (goModes[i] == TableGoMode.Z)
        //                        {
        //                            tableActionerItem.AbsMoveSingle(AxisName.Z, tableRunnerItem.GetPosition(strPosNames[i]).dZPos);
        //                        }
        //                        else if (goModes[i] == TableGoMode.U)
        //                        {
        //                            tableActionerItem.AbsMoveSingle(AxisName.U, tableRunnerItem.GetPosition(strPosNames[i]).dUPos);
        //                        }
        //                        else if (goModes[i] == TableGoMode.XY)
        //                        {
        //                            tableActionerItem.AbsMoveSingle(AxisName.X, tableRunnerItem.GetPosition(strPosNames[i]).dXPos);
        //                            tableActionerItem.AbsMoveSingle(AxisName.Y, tableRunnerItem.GetPosition(strPosNames[i]).dYPos);
        //                        }
        //                        else if (goModes[i] == TableGoMode.XZ)
        //                        {
        //                            tableActionerItem.AbsMoveSingle(AxisName.X, tableRunnerItem.GetPosition(strPosNames[i]).dXPos);
        //                            tableActionerItem.AbsMoveSingle(AxisName.Z, tableRunnerItem.GetPosition(strPosNames[i]).dZPos);
        //                        }
        //                        else if (goModes[i] == TableGoMode.XU)
        //                        {
        //                            tableActionerItem.AbsMoveSingle(AxisName.X, tableRunnerItem.GetPosition(strPosNames[i]).dXPos);
        //                            tableActionerItem.AbsMoveSingle(AxisName.U, tableRunnerItem.GetPosition(strPosNames[i]).dUPos);
        //                        }
        //                        else if (goModes[i] == TableGoMode.YZ)
        //                        {
        //                            tableActionerItem.AbsMoveSingle(AxisName.Y, tableRunnerItem.GetPosition(strPosNames[i]).dYPos);
        //                            tableActionerItem.AbsMoveSingle(AxisName.Z, tableRunnerItem.GetPosition(strPosNames[i]).dZPos);
        //                        }
        //                        else if (goModes[i] == TableGoMode.YU)
        //                        {
        //                            tableActionerItem.AbsMoveSingle(AxisName.Y, tableRunnerItem.GetPosition(strPosNames[i]).dYPos);
        //                            tableActionerItem.AbsMoveSingle(AxisName.U, tableRunnerItem.GetPosition(strPosNames[i]).dUPos);
        //                        }
        //                        else if (goModes[i] == TableGoMode.ZU)
        //                        {
        //                            tableActionerItem.AbsMoveSingle(AxisName.Z, tableRunnerItem.GetPosition(strPosNames[i]).dZPos);
        //                            tableActionerItem.AbsMoveSingle(AxisName.U, tableRunnerItem.GetPosition(strPosNames[i]).dUPos);
        //                        }
        //                        else if (goModes[i] == TableGoMode.XYZ)
        //                        {
        //                            tableActionerItem.AbsMoveSingle(AxisName.X, tableRunnerItem.GetPosition(strPosNames[i]).dXPos);
        //                            tableActionerItem.AbsMoveSingle(AxisName.Y, tableRunnerItem.GetPosition(strPosNames[i]).dYPos);
        //                            tableActionerItem.AbsMoveSingle(AxisName.Z, tableRunnerItem.GetPosition(strPosNames[i]).dZPos);
        //                        }
        //                        else if (goModes[i] == TableGoMode.XYU)
        //                        {
        //                            tableActionerItem.AbsMoveSingle(AxisName.X, tableRunnerItem.GetPosition(strPosNames[i]).dXPos);
        //                            tableActionerItem.AbsMoveSingle(AxisName.Y, tableRunnerItem.GetPosition(strPosNames[i]).dYPos);
        //                            tableActionerItem.AbsMoveSingle(AxisName.U, tableRunnerItem.GetPosition(strPosNames[i]).dUPos);
        //                        }
        //                        else if (goModes[i] == TableGoMode.YZU)
        //                        {
        //                            tableActionerItem.AbsMoveSingle(AxisName.Y, tableRunnerItem.GetPosition(strPosNames[i]).dYPos);
        //                            tableActionerItem.AbsMoveSingle(AxisName.Z, tableRunnerItem.GetPosition(strPosNames[i]).dZPos);
        //                            tableActionerItem.AbsMoveSingle(AxisName.U, tableRunnerItem.GetPosition(strPosNames[i]).dUPos);
        //                        }
        //                        else if (goModes[i] == TableGoMode.XZU)
        //                        {
        //                            tableActionerItem.AbsMoveSingle(AxisName.X, tableRunnerItem.GetPosition(strPosNames[i]).dXPos);
        //                            tableActionerItem.AbsMoveSingle(AxisName.Z, tableRunnerItem.GetPosition(strPosNames[i]).dZPos);
        //                            tableActionerItem.AbsMoveSingle(AxisName.U, tableRunnerItem.GetPosition(strPosNames[i]).dUPos);
        //                        }
        //                        else if (goModes[i] == TableGoMode.XYZU)
        //                        {
        //                            tableActionerItem.AbsMoveSingle(AxisName.X, tableRunnerItem.GetPosition(strPosNames[i]).dXPos);
        //                            tableActionerItem.AbsMoveSingle(AxisName.Y, tableRunnerItem.GetPosition(strPosNames[i]).dYPos);
        //                            tableActionerItem.AbsMoveSingle(AxisName.Z, tableRunnerItem.GetPosition(strPosNames[i]).dZPos);
        //                            tableActionerItem.AbsMoveSingle(AxisName.U, tableRunnerItem.GetPosition(strPosNames[i]).dUPos);
        //                        }
        //                    }
        //                    timer.Start();
        //                    break;
        //                }
        //                System.Threading.Thread.Sleep(1);
        //            }

        //        }
        //        bool bMoveDone = false;
        //        for (int i = 0; i < strTableNames.Length; i++)
        //        {
        //            TableActioner tableActionerItem = TableManager.Table(strTableNames[i]);
        //            bMoveDone = tableActionerItem.MoveDoneALL();
        //            if (bMoveDone == false)
        //            {
        //                break;
        //            }
        //        }
        //        if (bMoveDone)
        //        {
        //            break;
        //        }
        //        if (timer.TimeUp(120))
        //        {
        //            XtraMessageBox.Show("同时执行" + "运动超时");
        //            timer.Start();
        //        }
        //        System.Threading.Thread.Sleep(1);
        //    }

        //    #endregion Wait

        //    return true;
        //}
        //public static bool GoAsTheSameTime(string[] strTableNames, TableDataPosition[] posDatas, string[] tableSpds, TableGoMode[] goModes)
        //{
        //    if (strTableNames.Length != posDatas.Length)
        //    {
        //        throw (new Exception("同时运动中平台和位置的个数不相等:"));
        //    }
        //    if (strTableNames.Length != tableSpds.Length)
        //    {
        //        throw (new Exception("同时运动中平台和速度的个数不相等:"));
        //    }
        //    if (strTableNames.Length != goModes.Length)
        //    {
        //        throw (new Exception("同时运动中平台和运动模式的个数不相等:"));
        //    }
        //    CheckStartMoveAtTheSaveTime();
        //    for (int i = 0; i < posDatas.Length; i++)
        //    {
        //        TableActioner tableActionerItem = TableManager.Table(strTableNames[i]);
        //        TableRunner tableRunnerItem = new TableRunner(strTableNames[i]);
        //        tableActionerItem.SetSpd(tableSpds[i]);
        //        if (goModes[i] == TableGoMode.X)
        //        {
        //            tableActionerItem.AbsMoveSingle(AxisName.X, posDatas[i].dXPos);
        //        }
        //        else if (goModes[i] == TableGoMode.Y)
        //        {
        //            tableActionerItem.AbsMoveSingle(AxisName.Y, posDatas[i].dYPos);
        //        }
        //        else if (goModes[i] == TableGoMode.Z)
        //        {
        //            tableActionerItem.AbsMoveSingle(AxisName.Z, posDatas[i].dZPos);
        //        }
        //        else if (goModes[i] == TableGoMode.U)
        //        {
        //            tableActionerItem.AbsMoveSingle(AxisName.U, posDatas[i].dUPos);
        //        }
        //        else if (goModes[i] == TableGoMode.XY)
        //        {
        //            tableActionerItem.AbsMoveSingle(AxisName.X, posDatas[i].dXPos);
        //            tableActionerItem.AbsMoveSingle(AxisName.Y, posDatas[i].dYPos);
        //        }
        //        else if (goModes[i] == TableGoMode.XZ)
        //        {
        //            tableActionerItem.AbsMoveSingle(AxisName.X, posDatas[i].dXPos);
        //            tableActionerItem.AbsMoveSingle(AxisName.Z, posDatas[i].dZPos);
        //        }
        //        else if (goModes[i] == TableGoMode.XU)
        //        {
        //            tableActionerItem.AbsMoveSingle(AxisName.X, posDatas[i].dXPos);
        //            tableActionerItem.AbsMoveSingle(AxisName.U, posDatas[i].dUPos);
        //        }
        //        else if (goModes[i] == TableGoMode.YZ)
        //        {
        //            tableActionerItem.AbsMoveSingle(AxisName.Y, posDatas[i].dYPos);
        //            tableActionerItem.AbsMoveSingle(AxisName.Z, posDatas[i].dZPos);
        //        }
        //        else if (goModes[i] == TableGoMode.YU)
        //        {
        //            tableActionerItem.AbsMoveSingle(AxisName.Y, posDatas[i].dYPos);
        //            tableActionerItem.AbsMoveSingle(AxisName.U, posDatas[i].dUPos);
        //        }
        //        else if (goModes[i] == TableGoMode.ZU)
        //        {
        //            tableActionerItem.AbsMoveSingle(AxisName.Z, posDatas[i].dZPos);
        //            tableActionerItem.AbsMoveSingle(AxisName.U, posDatas[i].dUPos);
        //        }
        //        else if (goModes[i] == TableGoMode.XYZ)
        //        {
        //            tableActionerItem.AbsMoveSingle(AxisName.X, posDatas[i].dXPos);
        //            tableActionerItem.AbsMoveSingle(AxisName.Y, posDatas[i].dYPos);
        //            tableActionerItem.AbsMoveSingle(AxisName.Z, posDatas[i].dZPos);
        //        }
        //        else if (goModes[i] == TableGoMode.XYU)
        //        {
        //            tableActionerItem.AbsMoveSingle(AxisName.X, posDatas[i].dXPos);
        //            tableActionerItem.AbsMoveSingle(AxisName.Y, posDatas[i].dYPos);
        //            tableActionerItem.AbsMoveSingle(AxisName.U, posDatas[i].dUPos);
        //        }
        //        else if (goModes[i] == TableGoMode.YZU)
        //        {
        //            tableActionerItem.AbsMoveSingle(AxisName.Y, posDatas[i].dYPos);
        //            tableActionerItem.AbsMoveSingle(AxisName.Z, posDatas[i].dZPos);
        //            tableActionerItem.AbsMoveSingle(AxisName.U, posDatas[i].dUPos);
        //        }
        //        else if (goModes[i] == TableGoMode.XZU)
        //        {
        //            tableActionerItem.AbsMoveSingle(AxisName.X, posDatas[i].dXPos);
        //            tableActionerItem.AbsMoveSingle(AxisName.Z, posDatas[i].dZPos);
        //            tableActionerItem.AbsMoveSingle(AxisName.U, posDatas[i].dUPos);
        //        }
        //        else if (goModes[i] == TableGoMode.XYZU)
        //        {
        //            tableActionerItem.AbsMoveSingle(AxisName.X, posDatas[i].dXPos);
        //            tableActionerItem.AbsMoveSingle(AxisName.Y, posDatas[i].dYPos);
        //            tableActionerItem.AbsMoveSingle(AxisName.Z, posDatas[i].dZPos);
        //            tableActionerItem.AbsMoveSingle(AxisName.U, posDatas[i].dUPos);
        //        }
        //    }
        //    CurrentTraceMoveAtTheSameTime("Call GoAsTheSameTime Function");
        //    GeneralLib.HiPerfTimer timer = new GeneralLib.HiPerfTimer();
        //    timer.Start();
        //    #region Wait

        //    while (true)
        //    {
        //        if (CheckNeedStopMoveAtTheSameTime())
        //        {
        //            for (int i = 0; i < strTableNames.Length; i++)
        //            {
        //                TableActioner tableActionerItem = TableManager.Table(strTableNames[i]);
        //                tableActionerItem.SetSpd(tableSpds[i]);
        //                tableActionerItem.StopALL();
        //            }
        //            for (int i = 0; i < strTableNames.Length; i++)
        //            {
        //                TableRunner tableRunner = new TableRunner(strTableNames[i]);
        //                tableRunner.WaitMoveDoneALL();
        //            }
        //            while (true)
        //            {
        //                if (!CheckNeedStopMoveAtTheSameTime())
        //                {
        //                    for (int i = 0; i < posDatas.Length; i++)
        //                    {
        //                        TableActioner tableActionerItem = TableManager.Table(strTableNames[i]);
        //                        TableRunner tableRunnerItem = new TableRunner(strTableNames[i]);
        //                        tableActionerItem.SetSpd(tableSpds[i]);
        //                        if (goModes[i] == TableGoMode.X)
        //                        {
        //                            tableActionerItem.AbsMoveSingle(AxisName.X, posDatas[i].dXPos);
        //                        }
        //                        else if (goModes[i] == TableGoMode.Y)
        //                        {
        //                            tableActionerItem.AbsMoveSingle(AxisName.Y, posDatas[i].dYPos);
        //                        }
        //                        else if (goModes[i] == TableGoMode.Z)
        //                        {
        //                            tableActionerItem.AbsMoveSingle(AxisName.Z, posDatas[i].dZPos);
        //                        }
        //                        else if (goModes[i] == TableGoMode.U)
        //                        {
        //                            tableActionerItem.AbsMoveSingle(AxisName.U, posDatas[i].dUPos);
        //                        }
        //                        else if (goModes[i] == TableGoMode.XY)
        //                        {
        //                            tableActionerItem.AbsMoveSingle(AxisName.X, posDatas[i].dXPos);
        //                            tableActionerItem.AbsMoveSingle(AxisName.Y, posDatas[i].dYPos);
        //                        }
        //                        else if (goModes[i] == TableGoMode.XZ)
        //                        {
        //                            tableActionerItem.AbsMoveSingle(AxisName.X, posDatas[i].dXPos);
        //                            tableActionerItem.AbsMoveSingle(AxisName.Z, posDatas[i].dZPos);
        //                        }
        //                        else if (goModes[i] == TableGoMode.XU)
        //                        {
        //                            tableActionerItem.AbsMoveSingle(AxisName.X, posDatas[i].dXPos);
        //                            tableActionerItem.AbsMoveSingle(AxisName.U, posDatas[i].dUPos);
        //                        }
        //                        else if (goModes[i] == TableGoMode.YZ)
        //                        {
        //                            tableActionerItem.AbsMoveSingle(AxisName.Y, posDatas[i].dYPos);
        //                            tableActionerItem.AbsMoveSingle(AxisName.Z, posDatas[i].dZPos);
        //                        }
        //                        else if (goModes[i] == TableGoMode.YU)
        //                        {
        //                            tableActionerItem.AbsMoveSingle(AxisName.Y, posDatas[i].dYPos);
        //                            tableActionerItem.AbsMoveSingle(AxisName.U, posDatas[i].dUPos);
        //                        }
        //                        else if (goModes[i] == TableGoMode.ZU)
        //                        {
        //                            tableActionerItem.AbsMoveSingle(AxisName.Z, posDatas[i].dZPos);
        //                            tableActionerItem.AbsMoveSingle(AxisName.U, posDatas[i].dUPos);
        //                        }
        //                        else if (goModes[i] == TableGoMode.XYZ)
        //                        {
        //                            tableActionerItem.AbsMoveSingle(AxisName.X, posDatas[i].dXPos);
        //                            tableActionerItem.AbsMoveSingle(AxisName.Y, posDatas[i].dYPos);
        //                            tableActionerItem.AbsMoveSingle(AxisName.Z, posDatas[i].dZPos);
        //                        }
        //                        else if (goModes[i] == TableGoMode.XYU)
        //                        {
        //                            tableActionerItem.AbsMoveSingle(AxisName.X, posDatas[i].dXPos);
        //                            tableActionerItem.AbsMoveSingle(AxisName.Y, posDatas[i].dYPos);
        //                            tableActionerItem.AbsMoveSingle(AxisName.U, posDatas[i].dUPos);
        //                        }
        //                        else if (goModes[i] == TableGoMode.YZU)
        //                        {
        //                            tableActionerItem.AbsMoveSingle(AxisName.Y, posDatas[i].dYPos);
        //                            tableActionerItem.AbsMoveSingle(AxisName.Z, posDatas[i].dZPos);
        //                            tableActionerItem.AbsMoveSingle(AxisName.U, posDatas[i].dUPos);
        //                        }
        //                        else if (goModes[i] == TableGoMode.XZU)
        //                        {
        //                            tableActionerItem.AbsMoveSingle(AxisName.X, posDatas[i].dXPos);
        //                            tableActionerItem.AbsMoveSingle(AxisName.Z, posDatas[i].dZPos);
        //                            tableActionerItem.AbsMoveSingle(AxisName.U, posDatas[i].dUPos);
        //                        }
        //                        else if (goModes[i] == TableGoMode.XYZU)
        //                        {
        //                            tableActionerItem.AbsMoveSingle(AxisName.X, posDatas[i].dXPos);
        //                            tableActionerItem.AbsMoveSingle(AxisName.Y, posDatas[i].dYPos);
        //                            tableActionerItem.AbsMoveSingle(AxisName.Z, posDatas[i].dZPos);
        //                            tableActionerItem.AbsMoveSingle(AxisName.U, posDatas[i].dUPos);
        //                        }
        //                    }
        //                    timer.Start();
        //                    break;
        //                }
        //                System.Threading.Thread.Sleep(1);
        //            }

        //        }
        //        bool bMoveDone = false;
        //        for (int i = 0; i < strTableNames.Length; i++)
        //        {
        //            TableActioner tableActionerItem = TableManager.Table(strTableNames[i]);
        //            bMoveDone = tableActionerItem.MoveDoneALL();
        //            if (bMoveDone == false)
        //            {
        //                break;
        //            }
        //        }
        //        if (bMoveDone)
        //        {
        //            break;
        //        }
        //        if (timer.TimeUp(120))
        //        {
        //            XtraMessageBox.Show("同时执行" + "运动超时");
        //            timer.Start();
        //        }
        //        System.Threading.Thread.Sleep(1);
        //    }

        //    #endregion Wait


        //    return true;
        //}
        //public static bool GoAsTheSameTime(string[] strTableNames, string[] strPosNames, string[] tableSpds)
        //{
        //    if (strTableNames.Length != strPosNames.Length)
        //    {
        //        throw (new Exception("同时运动中平台和位置的个数不相等:"));
        //    }
        //    if (strTableNames.Length != tableSpds.Length)
        //    {
        //        throw (new Exception("同时运动中平台和速度的个数不相等:"));
        //    }
        //    for (int i = 0; i < strTableNames.Length; i++)
        //    {
        //        TableActioner tableActionerItem = TableManager.Table(strTableNames[i]);

        //        bool bNameExit = false;
        //        if (tableActionerItem.tableDateGlabal.dicTableDataPos.Keys.Contains(strPosNames[i]))
        //        {
        //            bNameExit = true;
        //        }
        //        if (tableActionerItem.tableDate.dicTableDataPos.Keys.Contains(strPosNames[i]))
        //        {
        //            bNameExit = true;
        //        }
        //        if (bNameExit == false)
        //        {
        //            throw (new Exception(strTableNames[i] + "运动平台中没有:" + strPosNames[i] + "位置点"));
        //        }
        //    }

        //    CheckStartMoveAtTheSaveTime();
        //    for (int i = 0; i < strTableNames.Length; i++)
        //    {
        //        TableActioner tableActionerItem = TableManager.Table(strTableNames[i]);
        //        tableActionerItem.SetSpd(tableSpds[i]);
        //        tableActionerItem.Go(strPosNames[i]);
        //    }

        //    CurrentTraceMoveAtTheSameTime("Call GoAsTheSameTime Function");
        //    GeneralLib.HiPerfTimer timer = new GeneralLib.HiPerfTimer();
        //    timer.Start();
        //    #region Wait

        //    while (true)
        //    {
        //        if (CheckNeedStopMoveAtTheSameTime())
        //        {
        //            for (int i = 0; i < strTableNames.Length; i++)
        //            {
        //                TableActioner tableActionerItem = TableManager.Table(strTableNames[i]);
        //                tableActionerItem.StopALL();
        //            }
        //            for (int i = 0; i < strTableNames.Length; i++)
        //            {
        //                TableRunner tableRunner = new TableRunner(strTableNames[i]);
        //                tableRunner.WaitMoveDoneALL();
        //            }
        //            while (true)
        //            {
        //                if (!CheckNeedStopMoveAtTheSameTime())
        //                {
        //                    for (int i = 0; i < strTableNames.Length; i++)
        //                    {
        //                        TableActioner tableActionerItem = TableManager.Table(strTableNames[i]);
        //                        tableActionerItem.SetSpd(tableSpds[i]);
        //                        tableActionerItem.Go(strPosNames[i]);
        //                    }
        //                    timer.Start();
        //                    break;
        //                }
        //                System.Threading.Thread.Sleep(1);
        //            }

        //        }
        //        bool bMoveDone = false;
        //        for (int i = 0; i < strTableNames.Length; i++)
        //        {
        //            TableActioner tableActionerItem = TableManager.Table(strTableNames[i]);
        //            bMoveDone = tableActionerItem.MoveDoneALL();
        //            if (bMoveDone == false)
        //            {
        //                break;
        //            }
        //        }
        //        if (bMoveDone)
        //        {
        //            break;
        //        }
        //        if (timer.TimeUp(120))
        //        {
        //            XtraMessageBox.Show("同时执行" + "运动超时");
        //            timer.Start();
        //        }
        //        System.Threading.Thread.Sleep(1);
        //    }

        //    #endregion Wait
        //    return true;
        //}
        //public static bool GoAsTheSameTime(string[] strTableNames, TableDataPosition[] posDatas, string[] tableSpds)
        //{
        //    if (strTableNames.Length != posDatas.Length)
        //    {
        //        throw (new Exception("同时运动中平台和位置的个数不相等:"));
        //    }
        //    if (strTableNames.Length != tableSpds.Length)
        //    {
        //        throw (new Exception("同时运动中平台和速度的个数不相等:"));
        //    }
        //    CheckStartMoveAtTheSaveTime();
        //    for (int i = 0; i < strTableNames.Length; i++)
        //    {
        //        TableActioner tableActionerItem = TableManager.Table(strTableNames[i]);
        //        tableActionerItem.SetSpd(tableSpds[i]);
        //        tableActionerItem.Go(posDatas[i]);
        //    }
        //    CurrentTraceMoveAtTheSameTime("Call GoAsTheSameTime Function");
        //    GeneralLib.HiPerfTimer timer = new GeneralLib.HiPerfTimer();
        //    timer.Start();
        //    #region Wait

        //    while (true)
        //    {
        //        if (CheckNeedStopMoveAtTheSameTime())
        //        {
        //            for (int i = 0; i < strTableNames.Length; i++)
        //            {
        //                TableActioner tableActionerItem = TableManager.Table(strTableNames[i]);
        //                tableActionerItem.SetSpd(tableSpds[i]);
        //                tableActionerItem.StopALL();
        //            }
        //            for (int i = 0; i < strTableNames.Length; i++)
        //            {
        //                TableRunner tableRunner = new TableRunner(strTableNames[i]);
        //                tableRunner.WaitMoveDoneALL();
        //            }
        //            while (true)
        //            {
        //                if (!CheckNeedStopMoveAtTheSameTime())
        //                {
        //                    for (int i = 0; i < strTableNames.Length; i++)
        //                    {
        //                        TableActioner tableActionerItem = TableManager.Table(strTableNames[i]);
        //                        tableActionerItem.SetSpd(tableSpds[i]);
        //                        tableActionerItem.Go(posDatas[i]);
        //                    }
        //                    timer.Start();
        //                    break;
        //                }
        //                System.Threading.Thread.Sleep(1);
        //            }

        //        }
        //        bool bMoveDone = false;
        //        for (int i = 0; i < strTableNames.Length; i++)
        //        {
        //            TableActioner tableActionerItem = TableManager.Table(strTableNames[i]);
        //            bMoveDone = tableActionerItem.MoveDoneALL();
        //            if (bMoveDone == false)
        //            {
        //                break;
        //            }
        //        }
        //        if (bMoveDone)
        //        {
        //            break;
        //        }
        //        if (timer.TimeUp(120))
        //        {
        //            XtraMessageBox.Show("同时执行" + "运动超时");
        //            timer.Start();
        //        }
        //        System.Threading.Thread.Sleep(1);
        //    }

        //    #endregion Wait
        //    return true;
        //}

    }
}
